cancel
Showing results for 
Search instead for 
Did you mean: 

PDS creation in APO using BAPI

Former Member
0 Kudos

Hi,

I am trying to upload PDS directly in APO using BAPI, but I am getting few errors while uploading.

I am getting an error that the product dpoe not exist though the product is their in APO.

First question is has anyone uploaded PDS using BAPI directly in APO and can you please share any inputs regarding the upload?

Does PDS BAPI Delete the existing BAPI first before uploading BAPI for the same Product in case we need to update few parameters?

Do we need to provide PDS name and is their any specific nomenclature to be followed?

It will be great help if the SAP gurus can provide any inputs regarding the PDS BAPI

Regards,

Sanjog Mishrikotkar

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I have raise an OSS and SAP has asked me to pass the product value programmaticaly and it works.

But their is a issue with execuion of BAPi as a result of a conversion routine

Former Member
0 Kudos

Hi Andy,

Long time!

I was trying to make this Bapi work in test mode and was getting the same error (product not found). Based on what you said without a note that is a hopeless cause. no matter what I put in the product field it will be converted and checked incorrectly.

Thanks for the input.

George

Former Member
0 Kudos

Hi Sanjog - the product must be in APO external format (see /sapapo/matmap-ext_matnr - if source of data is R3 then it will most likely be 18 positions) or the BAPI will give an error. Also you need to pass business group for the product. You will have to pass the PDS name since it is a key in all tables. Whenever you use the BADI you need to pass all data even if you are changing only a few fields. One thing you can do is when a PDS exists call the getlist BAPI to retrieve all info, change the fields you want in the tables then call the savemulti BADI. Another thing to note is that PDS' created by the BADI can only be maintained by a BADI so if you are creating PDS that will be maintained via CIF that is not possible.

Andy

Former Member
0 Kudos

Hi Andy,

Thanks a lot for the inputs.

I have already tried using Product no from /SAPAPO/MATMAP which is a 18 CHAR id as you have mentioned but the BAPI is truncating the 0 when I try to enetr the preceding 0, I have also tried by providing space and then entering 18 digit Product No.

But still giving me the same error that the product does not exist.

Also I tried by creating a Alphabetical Product No in APO and using the product to create PDS, I am not getting the "Product Does not Exist" error and the Return value from BAPI is also 0, but the PDS is not getting saved.

Have you ever worked on this FM and were you able to upload the PDS? Can you please guide me with more inputs?

Thanks & Regads,

Sanjog

Former Member
0 Kudos

Hi Sanjog - yes I have used this BAPI. I think that we implemented the BADI for savemultiple to modify the header and component products using direct matmap reads instead of PRODU conversion to change the product to be in ext_matnr format. We did not have time to work with SAP on creating a message/note. There may be a note available now for this so you may want to look. The problem is the product field in the header and component tables is tied to the PRODU conversion when it should not be and then is checked against the ext_matnr field in /sapapo/matmap - this is contradictory. You will need to either implement the same as above or find/create OSS.

Andy

Former Member
0 Kudos

Hi Andy,

Thanks a lot for your inputs, actually I had few queries

1. As I understand to make any changes in PDS parameter, you cannot change the existing PDS but have to delete and ceate a new PDS with all the parameters? but from your response are you able to make delta changes in PDS?

2. I am able to create a PDS with a certain PDS name only for 4-5 times and after that for the same test data the PDS is not created. but if i change the PDS name for the same data I can create the PDS, but again onlyfor 3-4 times.

I require this since I m creating PDS again for the same data if their is a change in parameter after deleting existing PDS.

3. I am not able to create Operation without any resource to take care of cycle time.

Thanks,

Sanjog

Former Member
0 Kudos

Hi Sanjog -

1) The savemulti BAPI will perform the replacement of the entire PDS on it's own which does not require you to delete the PDS prior to the update. The same is true for CIF though there are some exceptions. In either case the entire PDS data needs to be transferred for this to happen even if you are only changing one field value. This is why I suggested you use a getlist first to retrieve all info for a PDS before changing it. You can view this as a "delta" since you are only changing some of the PDS but behind the scenes the entire PDS data is being replaced.

2) Are you deleting the PDS using transaction cull_rto_del or via BAPI? If BAPI are you allowing enough time for commit? If using savemulti then you do not need to delete PDS (some exceptions may exist since there are some with CIF).

3) Every operation must have an activity that consumes capacity on a resource. So every operation must have at least 1 activity, 1 mode and 1 capreq - there is a min capacity for an activity or the PDS will not be created, depending on master output qty. If you are getting an error and you think there should be capacity then check the base qty versus lot size and also calculate the the capacity to check it's value. Ideally you will have a scenario where the capacity is > 1 S for min lot size. You could have a PDS with a capacity on a resource < 1 but the master output qty and lot sizing would make the consumption more sizable in actual orders. If you are having a problem with this it could take a few iterations of modifying base qty/master output qty, lot size, capacity, etc to get the consumption to where it will be accepted in APO and match the desired consumption.

Andy

Former Member
0 Kudos

Hi Andy,

Thanks again for your reply and appreciate your time.

1. I have tried modifying a PDS by keeping all the parameters same and just changing value for one parameter for time phased yield in an activity, but the value is not getting modified. Is their any flag I need to set for changing value.

2. I am deleting using transaction cull_rto_del but it stops creating PDS after certain number of iteration of deletion with same PDS same which is realy strange.

3. I need a idle operation without any resource assigned which should be possible, I am defining activity, mode and capacity requirement for the operation but the resource field is blank.

Thanks & Regrds,

Sanjog Mishrikotkar

Former Member
0 Kudos

Hi Sanjog

1 - I have not used the BAPI for time phased - what field are you updating for the yield? are you using the TDPP table? PPDS and SNP differ in how the fields are used.

2 - try not using cull_rto_del and see how that works. If needed then add the deletemulti in you code with commit prior to the savemulti.

3 - you need to have at least 1 resource or the operation will be void. If you are trying to idle time then maybe use of setup or dummy (fake) resource will work. I am not sure of the situation but you cannot create a empty operation that consumes time alone - it must be ties to a resource.

Andy