cancel
Showing results for 
Search instead for 
Did you mean: 

Logic to get supplying plant and receiving plant address of STO from billing document

kartik_abhyankar
Explorer
0 Kudos

I have one scenario in which we have a smartform to print STO invoice output. I want to get supplying and receiving plant address to be printed, but not able to get the logic for the same. In selection screen invoice number is passed.

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor
0 Kudos

Sending plant will be there in VBRP-WERKS and Receiving Plant is nothing but Ship-To. Now to get the address of both sending plant and receiving plant, try the below logic

Go to T001W, input the plant code against WERKS and get ADRNR. Next go to VBPA, input that billing document against VBELN, pass SH against PARVW and get ADRNR. Finally, go to ADRC table, pass the above two ADRNR values to ADDRNUMBER to fetch the required address. Ask your ABAP team to apply this logic in the smart form

kartik_abhyankar
Explorer
0 Kudos

Thank you very much for the logic.

Answers (0)