cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_MOSRVAPS_SAVEMULTI3 creating planned order from Restricted Stock

Former Member
0 Kudos

Hi,

We have a requirement where we need to programmatically replicate the Push Production functionality as in /SAPAPO/RRP3 transaction. We are using the BAPI - BAPI_MOSRVAPS_SAVEMULTI3 and it is working fine for conversion of planned orders and Process Orders to component planned/process orders and dependant demand for the parent material. The issue is when we are trying to convert a restricted stock to a planned order and dependant demand using the BAPI, we are getting a message "No valid source of supply could be found". Please let us know if anyone has a resolution to this issue or if any further details are required.

Edited by: ARKAJEET DASGUPTA on Apr 1, 2011 7:28 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please check for which parameter table this error is occured.I mean to say, in the return table of BAPI you will get the parameter table name of BAPI also for which you are getting this error? check which data you are passing in that table.

Also please check the T-lane is maintained for that particular product location combination?

Regards,

Saurabh

Former Member
0 Kudos

Hi Saurabh,

The issue lies in the order_head table. I am populating the following fields in that table for all the orders(planned/process/rest stock):

DATE_FIXED

ORDER_START_DATE

ORDER_END_DATE

MASTER_PRODUCT

MASTER_PLANT

MASTER_ORDER_QUANTITY

MASTER_ATPCAT

Is there anything that I need to pass in SOURCE_NAME field for restricted stock?

I could not find the TLane field as mentioned by you in the product master though.Can you tell me where to look for it?

Regards

Arkajeet

Former Member
0 Kudos

Hi,

Tlane is not a field name,I wanted to say Transportation Lane(T-Lane) exist or not in the system for that product-location combination.

For the SOURCE_NAME field, it is clearly mentioned in the documentation of BAPI that,

Selection of sources of supply (for example, PP/DS PPM)

ORDER_END_DATE is used as standard as the selection time for the source of supply (in-house production). If ORDER_END_DATE is empty, the value from ORDER_START_DATE is used instead.

If a different time should be used to select the source of supply, this can be set using the EXPLOSION_DATE field.

If a date field is not specified for an order change, the date of the last explosion of this order is used for source of supply selection.

The entries in the MASTER<...> fields also play a role for source determination. That is, possible sources of supply are searched for on the basis of product, location, quantity, and so on.

For the selection of sources of supply, the setting from the product master for plan explosion is used.

If several possible alternative sources of supply are found, the system chooses one source of supply as standard.

However, if you want to select a specific source of supply that has been found, you can use the fields PLAN_NUMBER + PPM_NUMBER, PROD_VERSION, or SOURCE_NAME. Note that only one combination may be used; you cannot use both PLAN_NUMBER and PROD_VERSION at the same time because both are valid for different source of supply types.

Please check with the functional consultant, in plan explosion field in product master what value they have maintained.

Because BAPI will try to get the source of supply name on basis of that field which is mentioned in the documentation.

Regards,

Saurabh

Former Member
0 Kudos

Hi Saurabh,

Will discuss with the Functional Consultant(at onsite) and keep you posted on this through this thread.

Regards

Arkajeet

Former Member
0 Kudos

Hi Saurabh,

I checked the Plan Explosion field in the Product Master(PP/DS Order Creation section) for that location and it is empty.

Regards

Arkajeet

Former Member
0 Kudos

Hi,

That field is blank in product master that is why BAPI is not able to find out the Source of supply for that particular product location,If you know the Source Of supply name, you can pass it to the BAPI Or maintain the Plan Explosion so that it will determine the source of supply from it.I hope now everything is clear to you about the reason of that error.

Regards,

Saurabh

Former Member
0 Kudos

Hi Saurabh,

Thanks for your help. Will keep you posted on the outcome.

Regards

Arkajeet

Former Member
0 Kudos

Hi Saurabh,

The Onsite functional Consultant was not ready to understand the explanation. He stuck on the fact that if there is no error for the same config in /SAPAPO/RRP3 we would need to make our program work as well. So we had to debug the BAPI a lot and found that in that particular scenario the error came because of the date(start and end date of the stock which was 01/01/1970 ). So we went through the standard SAP logic in RRP3 to find finally that SAP changes the date to current date if the date is less than 01/02/1970. The functionality is now working as per the standard RRP3 logic. Thanks a lot for your help all the way.

Regards

Arkajeet

Answers (0)