Shared Top Border

Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Home arrow Sample Code arrow ABAP Reports arrow Document Flow
Document Flow PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Kevin Wilson   
Saturday, 10 February 2007
Report using a function module to retrieve and print the document flow for a sales order.

REPORT ZWSBDOCFLOW

                LINE-SIZE 170

                LINE-COUNT 65

                MESSAGE-ID ZO

                NO STANDARD PAGE HEADING.

TABLES: VBAK, VBCO6, LIKP, VBDPR.

DATA: XVBFA LIKE VBFA OCCURS 1 WITH HEADER LINE.

DATA: XLIKP LIKE LIKP OCCURS 1 WITH HEADER LINE.

SELECT-OPTIONS:

        VBELN FOR VBAK-VBELN DEFAULT '0000185996' TO '0000186003'.

 

SELECT * FROM VBAK WHERE VBELN IN VBELN.

 

    MOVE-CORRESPONDING VBAK TO VBCO6.

 

    CLEAR XVBFA. REFRESH XVBFA.

    CLEAR XLIKP. REFRESH XLIKP.

 

    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'

        EXPORTING

             COMWA         = VBCO6

        TABLES

             VBFA_TAB      = XVBFA.

 

    LOOP AT XVBFA WHERE ( VBTYP_N = 'J' )

                    AND ( VBTYP_V = 'C' ) .

 

                   MOVE:    XVBFA-VBELN TO XLIKP-VBELN.

                   COLLECT XLIKP.

 

    ENDLOOP.

 

    CHECK NOT XLIKP[] IS INITIAL.

 

    CLEAR VBDPR-TDNAME. "70 chars

    WRITE: / VBAK-VBELN.

 

    LOOP AT XLIKP.

         WRITE: /5 XLIKP-VBELN.

         SELECT SINGLE * FROM LIKP WHERE VBELN EQ XLIKP-VBELN.

         CHECK SY-SUBRC IS INITIAL.

         WRITE: 'found'.

    ENDLOOP.

ENDSELECT.


Related Items:

Last Updated ( Saturday, 10 February 2007 )
 
< Prev   Next >

Google Search

Google Ads

Shared Bottom Border

Contact Us | Polls | Add URL | Contribute | Privacy | Terms | Feedback

Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job
Financials Consultant | Consultant Review | Gallia Consulting | Supply Chain Project | SAP Financials Forum
GenieHoldings.COM, Inc. | Genie Press | WorkflowGenie | ESAGenie | ERPTopSites | ABAP Tips and Tricks | SAP Solutions Database

EDIGenie | Searching Survivor