2007 Jan 26 4:49 PM
Rich Heilman,
Thanks for your response. i have gone through your program 'dialog call: report zrich_0001'.
but i need to display sales doc, delivery doc, invoice doc using the abap program.
can u pls. help me reagrding this.
Best Regards
Rich Heilman,
Thanks for your response. i have gone through your program 'dialog call: report zrich_0001'.
but i need to display sales doc, delivery doc, invoice doc using the abap program.
can u pls. help me reagrding this.
Best Regards
2007 Jan 29 6:31 AM
Hi ,
For this info use table VBFA for document or use this function module based on sales order no use will get delivery ,billing document number.
Fill the structue comwa with order number .
vbeln = len.
wa-vbeln = id .
CLEAR : flagj,flagm,flags,itab_vbfa.
REFRESH itab_vbfa.
CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
EXPORTING
AUFBEREITUNG = '2'
BELEGTYP = ' '
comwa = wa
NACHFOLGER = 'X'
N_STUFEN = '50'
VORGAENGER = 'X'
V_STUFEN = '50'
IMPORTING
BELEGTYP_BACK =
TABLES
vbfa_tab = itab_vbfa.
EXCEPTIONS
NO_VBFA = 1
NO_VBUK_FOUND = 2
OTHERS = 3
READ TABLE itab_vbak INTO ls_vbak WITH KEY vbeln = id.
IF ls_vbak-vbtyp = 'C'.
READ TABLE itab_vbfa WITH KEY vbtyp_v = 'J' . - Delivery Number
IF sy-subrc <> 0.
flagj = 'X'.
ENDIF.
READ TABLE itab_vbfa WITH KEY vbtyp_n = 'M' . Billing Document Number .
IF sy-subrc <> 0.
flagm = 'X'.
endif.
Please reward if useful.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |