cancel
Showing results for 
Search instead for 
Did you mean: 

Standard function module to extract Sales orders data

Former Member
0 Kudos

Hi

Please let me know is there any <b>Standard Function Module to extract all the data for a sales order into a internal table</b> which can be used to pick the data for outputting, like selecting data from vbak into an internal table where vbeln is in the order list, similarly for vbap vbep vbkd vbuk vbup vbpa.

Regards

vani

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

hi,

you can use any of these function modules according to your need.

1.SD_SALES_DOCUMENT_READ : Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties)

2.SD_SALES_DOCUMENT_READ_POS: Reads sales document header and item material: tables VBAK, VBAP-MATNR SD_DOCUMENT_PARTNER_READ: partner information including address. Calls SD_PARTNER_READ

3.SD_DETERMINE_CONTRACT_TYPE: In: at least VBAK-VBELN

Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT

4.SD_SALES_DOCUMENT_COPY copy Sales Doc into new one with the required Sales Doc Type (VBAK-AUART) for further creating. ExampleO - create subsequent document

5. SD_SALES_DOCUMENT_SAVE create Sales Doc from the copied document V45K Sales Order Processing Functions 6.SD_SALES_DOCUMENT_ENQUEUE to dequeue use DEQUEUE_EVVBAKE V05I SD Index Update

7.SD_PARTNER_READ all the partners information and addresses V05O SD Data Collection for Dlv Note Printing

8.RV_DELIVERY_PRINT_VIEW Data provision for delivery note printing

9.SD_PACKING_PRINT_VIEW , SD_DELIVERY_VIEW Data collection for printing called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW

Former Member
0 Kudos

hi,

Better you check out this site.

http://www.geocities.com/victorav15/sapr3/abapfun.html.

this may helps you .

regards,

prema.A

Former Member
0 Kudos

Hi Vijay

Thank you for providing me solution, once again Thanks alot.

I don't have idea to give Reward points, while creating the question i didn't made any selection.

please let me know how to give reward points.

regards

vani.

former_member188685
Active Contributor
0 Kudos

hi,

if you don't specify it as question,then

you can modify it as question, and select the radio buttons, which is available against the post and reward.

if you still have some problem..

please let me know..

regards

vijay

Message was edited by: Vijay Babu Dudla

Former Member
0 Kudos

Hi

Thank you

I am currently working in 3.1i version, and in 3.1i the SD_CREATE_TEST_DATA and BAPISDORDER_GETDETAILEDLIST doesn't exist, please let me know is there any other way.

Regards

vani

former_member188685
Active Contributor
0 Kudos

Hi,

Check this FM SD_SALES_DOCUMENT_READ to read the sales order data.

regards

vijay

former_member186741
Active Contributor
0 Kudos

to use this bapi:

1. populate the flags in I_BAPI_VIEW for the data objects you are interested in, eg HEADER = 'X' if you want VBAK returned, item = 'X' FOR vbap ETC

2. put the docnos you are targetting in the table SALES_DOCUMENTS

Former Member
0 Kudos

Hi Vani,

You can use : BAPISDORDER_GETDETAILEDLIST

this will provide you complete information of a sales order.

You can see SAP Test program : SD_CREATE_TEST_DATA for how to use this BAPI.

Lanka

Message was edited by: Lanka Murthy