cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using BAPI_PO_CREATE1 w/ reference to a PR

former_member355937
Participant
0 Kudos

Hello Gurus,

I'm having problems using the BAPI BAPI_PO_CREATE1 w/ reference to a <b>PR</b>. When I run the BAPI I encountered an error msg: <i><b>Delivery date is in the past</b></i>. The PO was created but the delivery date in its schedule lines appears to be blank.

How do I go about it?

Thanks,

Jeffrey

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member223537
Active Contributor
0 Kudos

Hi,

After BAPI_PO_CREATE1, Do commit work and wait.

After that get the PO number.

Use FM BAPI_PO_CHANGE and pass the PO number.

Pass the parameters which you want to change.

Best regards,

Prashant

Former Member
0 Kudos

The delivery date that you are using / coming from PR is in the past, that is why this error.

Business process why its a problem to have delivery dates in the past right? Either you are not using the right PR or you should change the PO once created.

REgards,

Ravi

Note : Please mark all the helpful answers

former_member355937
Participant
0 Kudos

Hello Ravi,

But I change the delivery date as well as the stat. del. date in the schedule line items. Does this mean that it will still follow the delivery date in my reference PR and disregard whatever date I supplied?

Thanks,

Jeffrey

Former Member
0 Kudos

As you are creating the PO with ref to the PR, I think the data is going to get copied from the previos document or you have to change it manually after creatin the PO.

Regards,

Ravi

Note : Please mark all the helpful answers

former_member355937
Participant
0 Kudos

Hello Ravi,

How come it worked when I tried creating the document using t-code ME21N? I am expecting that it can also be done using BAPI BAPI_PO_CREATE1.

Thanks,

Jeffrey

Former Member
0 Kudos

I think in ME21n also it gives you a warning, right. Probably incase of BAPI it throws a hard ERROR.

Regards,

Ravi

Note : Please mark all the helpful answers

former_member355937
Participant
0 Kudos

Hello Ravi,

What do I have to do in order to change the delivery date of my reference PR prior to saving the document?