2016 Sep 01 7:15 AM
Hello Everyone,
Greetings!
I am using the standard FM ORDER_WRITE_DOCUMENT to update the PP change log for some standard fields in CDHDR and CDPOS tables.
I am passing the new and old AFKO internal tables. even i am not getting the change log updated in CDPOS and CDHDR tables.
But when i delete the whole entry of the old internal table. i am getting entries . But without the new and old values .
***************************************
CALL FUNCTION 'CO_00_CAUFVDB_AAXXX_TRANSFER'
EXPORTING
caufvdb_imp = ls_caufvdb
IMPORTING
aafko_exp = ls_xafko
aaufk_exp = ls_xaufk.
APPEND ls_xaufk TO lt_xaufk.
APPEND ls_xafko TO lt_xafko.
I got the LT_XAFKO values from the above FM similar for LT_YAFKO.
CALL FUNCTION 'ORDER_WRITE_DOCUMENT' IN UPDATE TASK
EXPORTING
objectid = l_objectid
tcode = sy-tcode
utime = sy-uzeit
udate = sy-datum
username = sy-uname
upd_afko = 'U'
TABLES
xafko = lt_xafko
yafko = lt_yafko.
***************************************
Please give me the code sample of the FM and please share your ideas!
Thanks in advance.
Regards,
Pradeep.
Hello Everyone,
Greetings!
I am using the standard FM ORDER_WRITE_DOCUMENT to update the PP change log for some standard fields in CDHDR and CDPOS tables.
I am passing the new and old AFKO internal tables. even i am not getting the change log updated in CDPOS and CDHDR tables.
But when i delete the whole entry of the old internal table. i am getting entries . But without the new and old values .
***************************************
CALL FUNCTION 'CO_00_CAUFVDB_AAXXX_TRANSFER'
EXPORTING
caufvdb_imp = ls_caufvdb
IMPORTING
aafko_exp = ls_xafko
aaufk_exp = ls_xaufk.
APPEND ls_xaufk TO lt_xaufk.
APPEND ls_xafko TO lt_xafko.
I got the LT_XAFKO values from the above FM similar for LT_YAFKO.
CALL FUNCTION 'ORDER_WRITE_DOCUMENT' IN UPDATE TASK
EXPORTING
objectid = l_objectid
tcode = sy-tcode
utime = sy-uzeit
udate = sy-datum
username = sy-uname
upd_afko = 'U'
TABLES
xafko = lt_xafko
yafko = lt_yafko.
***************************************
Please give me the code sample of the FM and please share your ideas!
Thanks in advance.
Regards,
Pradeep.
2016 Sep 01 10:13 AM
Do we need the 'Change document' flag needs to be set in Se11 data element level. ?
2016 Sep 01 10:24 AM
You could perform some search looking in standard report for call of ORDER_WRITE_DOCUMENT or CO_VB_WRITE_DOCUMENT and CO_VB_ORDER_POST.
Once you start to use unreleased FM, you got compelled to replicate the behavior of standard reports (*).
Regards,
Raymond
(*) Alas not much data is available in BAPI_PRODORD_CHANGE and BAPI_PROCORD_CHANGE since BAPI_ALM_ORDER_MAINTAIN was forbidden (since PP/PM 'divorce' of 2008)
2016 Sep 02 8:00 AM
Thanks Raymond for your reply .
I have just noticed that while using this FM i am getting the CDPOS update only to the fields has the flag 'Change document' as checked.
For ex : AFKO-GAMNG - No flag in data element - no CDPOS update happened.
AFVC-VORNR - has flag in data element - CPODS updated happened,
Regards,
Pradeep.
2016 Sep 02 8:22 AM
The flag on data element is required, else no log for this field.
Ref : Set Change Document Flag In Change Documents online documentation;
Regards,
Raymond.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |