Application Development and Automation 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: 
Read only

Creating requiorement using BAPI : BAPI_REQUIREMENTS_CREATE

Former Member
0 Likes
3,600

Hi all ,

I am trying to create requirement in the transaction MD61 using the BAPI BAPI_REQUIREMENTS_CREATE . When I execute the program I am getting the following message as <u><b>Requirement already exists, maintain via change transaction first</b></u> .

As of now if I goto MD63 and see there is no requirement with the given date and quantity . But if I goto MD61 and create the requirement it is getting created .

I debugged the BAPi and fiund the error message is being populated at : line 388 of the FM REQUIREMENTS_ITEM_MAINTAIN . however I am not able to diagnisethe issue .

Can anyone help to find out what the message means .

Hey , Can anyone help me with this .

Thanks ,

Varun .

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
2,009

Hi Varun,

It seems you already have requirement created. If the requirement already exits, system only allows you to change NOT create.

Please check table PBIM with same key fields as you passed to BAPI BAPI_REQUIREMENTS_CREATE.

Regards,

Ferry Lianto

6 REPLIES 6
Read only

ferry_lianto
Active Contributor
0 Likes
2,010

Hi Varun,

It seems you already have requirement created. If the requirement already exits, system only allows you to change NOT create.

Please check table PBIM with same key fields as you passed to BAPI BAPI_REQUIREMENTS_CREATE.

Regards,

Ferry Lianto

Read only

0 Likes
2,009

Hi Ferry ,

I can see an entry in PBIM . Does that mean I should use BAPI_REQUIREMENTS_CHANGE to change the requirement ?

I went to the transaction MD63 and if I check the schedule lines I can see an entry already existing there . Now I want to create another entry with today's date and different quantity . This is what I am trying to achieve . When I directly do in the transaction I am able to achieve it , But with anyof the FM BAPI_REQUIREMENTS_CREATE/BAPI_REQUIREMENTS_CHANGE I am not able to do that . Can you please help me to do that .

Thanks ,

Varun .

Read only

0 Likes
2,009

my requirement is upload apo data using BAPI_REQUIREMENTS_CREATE to md61.so idont know the procedure could u help me.and give example code also for this.

Thanks & Regards

srinivas.

Read only

ferry_lianto
Active Contributor
0 Likes
2,009

Hi,

Please try this.

- Use BAPI BAPI_REQUIREMENTS_GETDETAIL to get the old PIR data.

- Move the return values (table REQUIREMENTS_OUT) to an internal table. Then you loop at the internal table and replace the corresponding dates old data with new data.

- Then use BAPI BAPI_REQUIREMENTS_CHANGE to update the new dates with new data.

Regards,

Ferry Lianto

Read only

0 Likes
2,009

Hi Ferry ,

Can you tell me the significance of the table PBID .

When I am trying to read the details using BAPI_REQUIREMENTS_GETDETAIL for one of the material it is not returning any values and the reason is the select on the table PBIM failed . But when I goto MD63 I am able to see all the data on the screen . I am trying to get the schedule data . Can you please help me with this .

Thanks ,

Varun .

Read only

Former Member
0 Likes
2,009

hai varun iam also working with same.i dont exactly can u give code for this its very urgenr.iam waiting for ur replay.