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

BAPI_PO_CHANGE error

Former Member
0 Likes
837

Hi,

I am facing some issue in using BAPI_PO_CHANGE to change Downpayment fields, I have passed relevent values to fields in ls_bapimepoheader and change indicators in ls_bapimepoheaderx. But I am getting SYST: Date 00/00/0000 not expected error. i tried to change some other fields from BAPI it was working fine also I was able to change fields from ME22N.

CALL FUNCTION 'BAPI_PO_CHANGE'

       EXPORTING

         purchaseorder = is_ekko-ebeln

         poheader      = ls_bapimepoheader

         poheaderx     = ls_bapimepoheaderx

         no_messaging  = 'X'

       TABLES

         return        = lt_return

         poitem        = lt_bapimepoitem

         poitemx       = lt_bapimepoitemx.


Regards,

Ankitesh Khare

5 REPLIES 5
Read only

0 Likes
738

Hi

     Did you check the system date format and the format in which you have sent the date, you can check your default date format in SU01 under defaults tab, if that is the issue you can can use the

FM CONVERT_DATE_TO_INTERN_FORMAT .

Hope this helps.

Read only

navdeep_thakur12
Explorer
0 Likes
738

Hi Ankitesh,

check user setting for date format.

Read only

Former Member
0 Likes
738

Always pass the dates in BAPI in YYYYMMDD format unless and otherwise stated in FM documentation.

Read only

Former Member
0 Likes
738

Hi Ankitesh,

Check that all respective date fields are being passed in proper format and do check if any mandatory fields' are not missing.

Cheers,

Varun Sahu

Read only

Former Member
0 Likes
738

Use Bapi_PO_GETDETAIL first to get POHEADER in your case in a work area.

make required changes to the structure and use the same in BAPI_PO_CHANGE

You can check date format from bapi_po_getdetail as well.