Skip to Content

Update APO field TARGET_DUR by CIF interface

Hello,

We would like to force APO Target Days' Supply by CIF with a constant.

Field to be displayed in /SAPAPO/MAT1 > Lot Size > Quantity and Date Determination.

Technical name = TARGET_DUR

Some fields are already forced using APO's BADI SMOD_APOCF005.

For example we force the Safety Stock Method with a constant and it works very well.

(field MSDP_SP_METHOD)

In debug mode, it_matloc and it_matlocx are well filled with our Safety days' supply constant.

But in the end, the value visible in /SAPAPO/MAT1 is still empty. It seems that CIF interface calculate or map this field again, after BADI SMOD_APOCF005.

Do you have any other idea to update Safety Days' Supply by CIF ?

Is there a BADI or an user exit more powerfull than SMOD_APOCF005 ?

Thank you !

----------------

Here is the code used (which works fine for field MSDP_SP_METHOD)

ls_cif_matloc-msdp_sb_method = 'BT'.

ls_cif_matloc-target_dur = 20.

MODIFY it_matloc FROM ls_cif_matloc.

READ TABLE it_matlocx

INTO ls_matlocx WITH KEY ext_matnr = ls_cif_matloc-ext_matnr

ext_locno = ls_cif_matloc-ext_locno.

IF sy-subrc = 0.

lv_tabix = sy-tabix.

ls_matlocx-msdp_sb_method = 'X'

ls_matlocx-target_dur = 'X'.

MODIFY it_matlocx FROM ls_matlocx INDEX lv_tabix.

ENDIF.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 28, 2014 at 03:02 PM

    Hi Remy,

    I couple of weeks ago I load a document with an example of how to automate MAT1 fields when the materials are CIFfed. Please take a look of the document, I have detail the code:

    http://scn.sap.com/docs/DOC-56755

    In my code, the dafaults are entered in a custom table: ZAPOSETUP. You can modify this based on your needs.

    I checked and the field TARGET_DUR is available to be automated. You will need to add something like:

    WA_IT_MATLOC-TARGET_DUR = 'your default'.
    WA_IT_MATLOCX-TARGET_DUR = 'X'.

    Kind Regards,

    Mariano

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.