Skip to Content
author's profile photo Former Member
Former Member

EXIT_SAPLCMAT_001

hi

i am working on this EXIT_SAPLCMAT_001. requirement is to change values in some fields before this structure goes to scm side. here is code i have written. but is not working. has anyone worked on this exit before. please help me.

data : wa_cif_matloc like ct_cif_matloc,

wa_cif_matlocx like ct_cif_matlocx.

  • For updating planning procedure field

loop at ct_cif_matloc into wa_cif_matloc.

wa_cif_matloc-rrp_type = '5'.

append wa_cif_matloc to ct_cif_matloc.

endloop.

clear wa_cif_matloc.

  • for updating the changes to apo

loop at ct_cif_matlocx into wa_cif_matlocx.

wa_cif_matlocx-rrp_type = 'X'.

append wa_cif_matlocx to ct_cif_matlocx.

endloop.

clear wa_cif_matlocx.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 20, 2007 at 08:10 PM

    I think you are using APPEND instead of the MODIFY. You must use MODIFY, if you want to change the values.

    * For updating planning procedure field
    loop at ct_cif_matloc into wa_cif_matloc.
    wa_cif_matloc-rrp_type = '5'.
    MODIFY wa_cif_matloc to ct_cif_matloc.  
    endloop.
    clear wa_cif_matloc.
    
    * for updating the changes to apo
    loop at ct_cif_matlocx into wa_cif_matlocx.
    wa_cif_matlocx-rrp_type = 'X'.
    MODIFY wa_cif_matlocx to ct_cif_matlocx.
    endloop.

    And you are appending the same table on which you are doing the loop. Which leads to the run time error.

    loop at <b>ct_cif_matlocx</b> into wa_cif_matlocx.

    wa_cif_matlocx-rrp_type = 'X'.

    MODIFY wa_cif_matlocx to <b>ct_cif_matlocx</b>.

    endloop.

    Regards,

    Naimesh Patel

    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.