‎2007 Dec 11 11:57 AM
Hi All,
I have a requirement to create a program to punch the CATS entries through a Z program. I have got success in sending the standard field data in the CATS with the help of FM BAPI_CATIMESHEETMGR_INSERT. However I am not able to supply custom fields . I have read the documentation about the Fm but still it seems i am missing some thing. Can anybody help me out?
Regards,
Anu
‎2007 Dec 11 12:28 PM
Hello Anurita
Obviously you know that you have to fill the TABLES parameter <b>EXTENSIONIN </b>with your custom data. The documentation of this parameter describes how to fill it:
Customer Enhancement Import
Description
If you defined additional customer fields in your external application
or external system as well as in the SAP System and you want to transfer
data from them to the SAP System, you can use this import table. The
additional customer fields are reproduced in the customer-specific
fields in the CATSDB table using the BAPI_TE_CATSDB structure.
You should enter the name of the structure in the STRUCTURE field. The
contents of the BAPI_TE_CATSDB structure is contained in the data part.
The data part of this table must be structured analogously to the
BAPI_TE_CATSDB structure. The first 10 characters of the data part are
for the line numbers. The customer fields are linked to the
corresponding data record in the CATSRECORDS_IN table using the line
numbers.In order to fill custom data from a structured variable to the unstructured fields of EXTENSIONIN use the static method of <b>CL_ABAP_CONTAINER_UTILITIES</b>.
For details about its <i>static </i>methods please refer to:
Regards,
Uwe
‎2007 Dec 11 3:44 PM
Hi Uwe,
The class does not provide any help to me. Do you have any sample code which species wat all parameters needs to be supplied and how.
I have tried the class but it does not help me:
please look at the sample code below:
lv_struc = 'BAPI_TE_CATSDB'.
CALL METHOD cl_abap_container_utilities=>fill_container_c(
EXPORTING
im_value = lv_struc
IMPORTING
ex_container = wa_extensions-structure
).
wa_extensions-structure = 'BAPI_TE_CATSDB'.
CALL METHOD cl_abap_container_utilities=>fill_container_c(
EXPORTING
im_value = wa_bapi_te_catsdb
IMPORTING
ex_container = wa_extensions-valuepart1
).
wa_extensions-valuepart1 = wa_bapi_te_catsdb.
CHECK NOT wa_extensions IS INITIAL.
APPEND wa_extensions TO extensions.
.
.
.
.
.
CALL FUNCTION 'BAPI_CATIMESHEETMGR_INSERT'
EXPORTING
profile = lv_catsvariant
TABLES
catsrecords_in = lt_bapi_temp
extensionin = lt_extensions
return = lt_return.
Please let me know if you find any prblem in my code.
Regards,
Anu.
‎2007 Dec 17 4:39 AM
Hi Anu,
Did you find solution for your problem?
Please let me know the code snippet for the same if possible.
Thanks