2019 Mar 08 10:07 AM
Dear Friends,
when I call BAPI_PRODORDCONF_CREATE_TT, How do I update the custom fields in table AFRU.
This custom fields I use in co11n.
Please guide me .
2019 Mar 13 6:40 AM
Hi Michael, to answer directly your question - I wouldn't use enhancement here. Instead I'd just register a change and just insert custom fields mapping directly in the code where indicated above.
Before you go and change SAP standard code I'd advise some testing first:
Only after the above test proves the custom fields are transferred correctly (I'm 99% positive they will), go and add the custom fields transfer to tmp_afrud_tab with a simple change to SAP standard code. Make sure to have change assistant activated so your change can be easily tracked and reapplied on patching or upgrade.
HTH
Dominik Tylczyński
Dear Friends,
when I call BAPI_PRODORDCONF_CREATE_TT, How do I update the custom fields in table AFRU.
This custom fields I use in co11n.
Please guide me .
2019 Mar 08 4:34 PM
To my knowledge BAPI_PRODORDCONF_CREATE_TT doesn't support BAPI extensions concept.
You may try to enhance BAPI_PP_TIMETICKET structure with your custom fields, the same ones you have in AFRU. Then add transfer of those fields from TIMETICKETS table to tmp_afrud_tab table in BAPI_PRODORDCONF_CREATE_TT:
* Rückmeldelohnscheine in interne Struktur AFRUD umsetzen
LOOP AT timetickets.
CLEAR tmp_afrud_tab.
CALL FUNCTION 'MAP2I_PP_TIMETICKET_TO_AFRUD'
EXPORTING
bapi_pp_timeticket = timetickets
CHANGING
afrud = tmp_afrud_tab
EXCEPTIONS
error_converting_iso_code = 1
OTHERS = 2.
IF sy-subrc <> 0.
CALL FUNCTION 'BALW_BAPIRETURN_GET1'
EXPORTING
type = sy-msgty
cl = sy-msgid
number = sy-msgno
par1 = sy-msgv1
par2 = sy-msgv2
par3 = sy-msgv3
par4 = sy-msgv4
* LOG_NO = ' '
* LOG_MSG_NO = ' '
IMPORTING
bapireturn = return.
EXIT.
ENDIF.
---> customs fields transfer here
APPEND tmp_afrud_tab.
ENDLOOP.
That should work although I've not tested that.
Let us know if it works for you.
Best regards
Dominik Tylczyński
2019 Mar 09 9:49 AM
Thank you very much for your help.
Do you mean I need to use Enhancement options in BAPI_PRODORDCONF_CREATE_TT?
Can you guide me?
2019 Mar 13 6:40 AM
Hi Michael, to answer directly your question - I wouldn't use enhancement here. Instead I'd just register a change and just insert custom fields mapping directly in the code where indicated above.
Before you go and change SAP standard code I'd advise some testing first:
Only after the above test proves the custom fields are transferred correctly (I'm 99% positive they will), go and add the custom fields transfer to tmp_afrud_tab with a simple change to SAP standard code. Make sure to have change assistant activated so your change can be easily tracked and reapplied on patching or upgrade.
HTH
Dominik Tylczyński
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |