cancel
Showing results for 
Search instead for 
Did you mean: 

How to send new custom fields from R3 to APO

Former Member
0 Kudos

I am trying to transfer the data from R3 to APO . I have the Custom Fields ( Z fields ) in MARA, MARC, MARD tables. nearly 15 Z Fields.I checked User Exit for Enhancing the Material master in CIFMAT01. and Also Function Module EXIT_SAPLCMAT_001.But I need an example codes for Z fields mapping .

Do you have anly sample code in APO from R3 Point of view,

Regards,

Raju

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This is a sample code to modify a few fields for material-location data:

This can be written in EXIT_SAPLCMAT_001.

LOOP AT io_it_matloc.

LOOP AT io_it_matlocx WHERE

ext_matnr = io_it_matloc-ext_matnr AND

ext_locno = io_it_matloc-ext_locno.

io_it_matloc-sl_lsz_fixed = 'X'.

io_it_matlocx-sl_lsz_fixed = 'X'.

io_it_matloc-bstfe = wa_lotsz-bstfe.

io_it_matlocx-bstfe = 'X'.

io_it_matloc-lastl = wa_lotsz-lastl.

io_it_matlocx-lastl = 'X'.

MODIFY io_it_matloc.

MODIFY io_it_matlocx

ENDLOOP.

ENDLOOP.

This is essentially changing data in /sapapo/matloc hence affecting the material - location data.

*wa_lotsz-bstfe and wa_lotsz-lastl has values extracted from a database table

Please let me know in case of any questions.

You can follow the same process for material data (MARA from R/3) using io_matkey table.

Former Member
0 Kudos

Hi Anuradaha,

I have gone through the doucmentation , i observed

You can enhance the interface individually by using the table parameters OT_CIF_MATKEYCUS and OT_CIF_MATLOCCUS that are not used as standard. For this, create the customer includes CI_MTKYCUS and CI_MTLCCUS with the relevant fields. Note that you also need to create corresponding customer includes in SAP APO and process the data in an exit. For this, use the enhancement APOCF005 in SAP APO.

Note that if this exit is not implemented correctly, this can lead to inconsistencies or program terminations. You should therefore proceed with caution when making the necessary programming.

Here my point is:

if i have z-fields in MARA, MARC. is it required those files in CI_MTKYCUS and CI_MTLCCUS in both includes? if yes why to include in both structures?

if you have any idea on this please explain me.

Regards,

Raju

Former Member
0 Kudos

if its a field from MARA you should insert the field in CI_MTKYCUS and

if its a field in MARC the CI_MTLCCUS should be modified.

You would need to modify the outbound R/3 exit to populate teh z fields in the above structures

Also you would need to modify the inbound APO user exit to get these values in some standard APO fields or extend the /sapapo/matkey structure to have new field and use the inbound user exit to get values and populate in the new /sapapo/mateky fields.

Former Member
0 Kudos

Hi ,

we do have a same kind of requirement , i.e. to Create 4 customer fields in SCM, and to transfer the data from R/3.

for this we have created the 4 new fields using EEWB, so both /SAPAPO/MATIO, and /SAPAPO/MATLOC has those new fields in Structure.

In R/3 Side we have added those new fields in strucutre CI_MTLCCUS(custom structure to transfer data). and also we have added a logic in cusomr-Exit EXIT_SAPLCMAT_001 to pass the requitred fields in Changing Table OT_CIF_MATLOCCUS STRUCTURE CIFMTLCCUS (Customer Enhancement Structure for CIF_MATLOC).

Thing is that we still are not able to see the data in SCM.

we have checked outbound queues at runtime, and it doesnot have the structure OT_CIF_MATLOCCUS in the queues, where other objects like IT_CIF_MATLOC (CIF_MATLOC) are present in queues.

so please suggest me, the right away thing to do.

Nitin

former_member453166
Participant
0 Kudos

Did you take care (as mentioned above) of this using Exits APOCF005 and APOCF022? I believe just adding the fields to the tables/structures alone is not sufficient to initiate transfer to SCM.

Former Member
0 Kudos

yes, i did the necessary changes in exits and Enhancements.

now what i am facing is that, there is a Call Function CIF_PROD_SEND FM Destination at SCM via background Task, here the Tables has all the correct values , IT_CIF_MATLOCCUS to be specific.

But when we saw the same FM at SCD at runtime, it shows garbage values.

please suggest.

Nitin

Answers (0)