Application Development 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: 

BAPI or FM to get open sales orders to material like TC VA05N

alexanderdiring
Explorer
0 Kudos
3,653

Hi,

i'm searching for a bapi or fm to get a list with all open sales orders to a material like the tc va05n this do. Maybe some of you know such a bapi or fm.

I tried the fm SD_SELECT_SALES_DOCUMENTS but i don't get the result i hoped.

Would be happy if someone could help me.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
557

Hello Alexander,

To get Open Sales order has VA05N use the Function Module

RV_SALES_DOCUMENT_VIEW_3

We need to pass value to the Importing parameters VBCOM

To get the open sales order

VBCOM-VKORG = sales organisation

VBCOM-ZUART  = 'A'

VBCOM-TRVOG = '0'

VBCOM-STAT_DAZU = 'X'

VBCOM-NAME_DAZU = 'X'

VBCOM-KOPF_DAZU = 'X'

VBCOM-VBOFF = 'X'

VBCOM-AUDAT = Begin Date

VBCOM-AUDAT_BIS = end date

By passing this variable you will get the all open sales for given sales organisation and given date.

7 REPLIES 7

former_member196651
Contributor
0 Kudos
557

Hi Alexander,

If your requirement is met with VA05N, then what I suggest is to create a Z function module to get the data from VA05N by creating an enhancement in the form routine  liste_anzeigen of the program SD_SALES_ORDERS_VIEW. Call the program SD_SALES_ORDERS_VIEW using SUBMIT AND RETURN statement from the Z function module. From here you export the internal table  postab and import the same in your program.

Regards,

Abijith

0 Kudos
557

Hey,

thank you for your reply. I should have expressed myself diffrently. I need the amount of reservations and sales orders of a material.

I get the list with this fm: MD_STOCK_REQUIREMENTS_LIST_API. With this FM i read the data like MD04. With this list i can calculate the reservations and sales orders.

But i have now a problem with consumption-based materials. This Materials are not shown in the MD04. Maybe someone of you knows how to get out the amount of reserverations and sales orders of such a material. Maybe there is a FM or BAPI?

Regards,

Alex

0 Kudos
557

Hello Alexander Diring.

If a material is not shown in MD04, then that means there is no open requirement for that.

What do you mean by consumption-based materials? What movement type?

Regards.

Former Member
0 Kudos
558

Hello Alexander,

To get Open Sales order has VA05N use the Function Module

RV_SALES_DOCUMENT_VIEW_3

We need to pass value to the Importing parameters VBCOM

To get the open sales order

VBCOM-VKORG = sales organisation

VBCOM-ZUART  = 'A'

VBCOM-TRVOG = '0'

VBCOM-STAT_DAZU = 'X'

VBCOM-NAME_DAZU = 'X'

VBCOM-KOPF_DAZU = 'X'

VBCOM-VBOFF = 'X'

VBCOM-AUDAT = Begin Date

VBCOM-AUDAT_BIS = end date

By passing this variable you will get the all open sales for given sales organisation and given date.

0 Kudos
557

Hey madhu kumar,

thank you for your reply. This FM is really helpful for sales orders. Now i get all sales orders also for materials with MRP-Type VB.

@ K.Arun Prabhu i mean materials with MRP-Type VB. Sales Orders with materials which have this MRP-Type are not shown in MD04.

Now how i can get all reservations like dependet requirements for Materials with MRP-Type VB. This reservations are also not shown in md04.

Thank you for your help.

Regarads Alex

0 Kudos
557

Hello Alexander,

You can get Dependent Requirement for the materials from RESB table which are not shown in MD04 .

0 Kudos
557

also for materials with MRP Type VB?