Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sales order document flow

Former Member
0 Likes
1,579

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

1 REPLY 1
Read only

Former Member
0 Likes
439

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.