07-29-2014 6:16 AM
Hi Friends,
I am using the bapi ' BAPI_GOODSMVT_CREATE' to transfer posting in MIGO. The BAPI is running fine.But when i am giving BACK posting date(BUDAT) and BACK documnet date ,the system giving error. but when i am entering manually in MIGO ,the system allowing back date and documnet is geting posted.Please suggest how can i achive this.
Thanks,
Suresh Bheema
07-29-2014 7:52 AM
Hi Suresh,
Can you please use the below code.
DATA WA_DATE(10)
WRITE IT_HEAD-BUDAT TO WA_DATE.
Please let me know if you are facing issue.
Regards,
Vadamalai A
07-29-2014 6:22 AM
What error you are receiving when you call the BAPI BAPI_GOODSMVT_CREATE?
OR you may try to change the date format, I mean before calling the BAPI please use the below code
data WA_BUDAT(10).
WRITE BSEG-BUDAT TO WA_BUDAT.
Please let us know if you are facing issue still.
Regards,
Vadamalai A.
07-29-2014 6:28 AM
Thanks for reply,
I am using the below code for posting date and document date.I am getting the error system generated error "Please enter the correct posting date".
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = IT_HEAD-BUDAT
ACCEPT_INITIAL_DATE = 'X'
IMPORTING
DATE_INTERNAL = HEADER-PSTNG_DATE.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = IT_HEAD-BLDAT
ACCEPT_INITIAL_DATE = 'X'
IMPORTING
DATE_INTERNAL = HEADER-DOC_DATE.
07-29-2014 7:02 AM
Well there is no use giving both dates as back dates.
Posting date is use to determine the actual document posting pate. Recommended to use it as system date (sy-datum) for tracking purpose.
(Lets say suppose you want to track people who posted late after period closing.)
You can keep document date in past for the sake of making them visible to previous posting period, keeping posting date as current.
07-29-2014 7:52 AM
Hi Suresh,
Can you please use the below code.
DATA WA_DATE(10)
WRITE IT_HEAD-BUDAT TO WA_DATE.
Please let me know if you are facing issue.
Regards,
Vadamalai A