Skip to Content

CREMAS Update during inbound processing

Hi everybody,

I receive vendor information from a external system.

I want to import them by idoc type CREMAS05.

Everthing works fine.

But I have the problem that sometimes the external system sents a vendor number which is outside the allowed number range.

Therefore I want to implement a check. If this check is wron, I set a error status and message and the inbound will be canceld.

I have implemented Enhancement VSV00001 and User Exit EXIT_SAPLKD02_001 (Inbound: Read and process vendor segments)

the Problem is, that this user exit will be only called if the idoc includes a filled customer segment.

But in my case it didn't.

I had the idear to change the flag outside where are responsible for calling the user exit in that way, that evertime the exit will be called.

But there is no enhancement point there and I don't want to modify the SAP standard source.

How can I handle this?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Oct 24, 2011 at 01:04 PM

    You don't have any explicit point available but you can implement implicit enhancement. Try implementing the implicit enh point in the subroutine FILL_CRE_DATA_WITH_E1LFA1C towards end.


    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 24, 2011 at 04:34 PM


    thanks for the information.

    You are right,

    I tried to implement it inside subroutine for segment LFA1M.

    But I don't know what is wrong.

    If I want to activate the implementation I get the message the attribiute should be named as "ICON_CUSTOMER...".

    I don't know why.

    And I am sure that i have the right attribiute changed because I copied it from the original source code.

    What's wrong?

    I tried a static and dynmaic enhancement point

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2011 at 03:48 PM

    Ok, I found the problem.

    It was a misstake of myself.

    The variable was in a other submethod. So it was not known.

    If have now used an enhancement point idoc_post_01 at spot es_saplkd02

    The problem is now, that the inbound process stops after calling

    PERFORM call_transaction TABLES t_idoc_status
                                   USING  v_workflow_result
                                          ip_xk99_used .   "Note 523930
          IF v_workflow_result = 99999.

    I don't know exactly why. But it seems that at this point it was a first try to book the vendor. and if something wrong the import ends.

    But then then the user exit at the end makes no sence...

    Add a comment
    10|10000 characters needed characters exceeded

    • If you have duplicate Vendor number, it should not be able to reach to the point where it calls the subroutine call_transaction.

      If you have implemented the implicit point at subroutine FILL_CRE_DATA_WITH_E1LFA1C, your code should be similar to this:

      " do the validation of Vendor #
              v_workflow_result = 99999.   "<< this makes it to exit out and stops processing
              CLEAR t_idoc_status.
              t_idoc_status-docnum = f_idoc_control-docnum.
              t_idoc_status-status = c_idoc_stat_input_error.
              t_idoc_status-msgty = sy-msgty.
              t_idoc_status-msgid = sy-msgid.
              t_idoc_status-msgno = sy-msgno.
              t_idoc_status-msgv1 = sy-msgv1.
              t_idoc_status-msgv2 = sy-msgv2.
              t_idoc_status-msgv3 = sy-msgv3.
              t_idoc_status-msgv4 = sy-msgv4.
              t_idoc_status-segnum = segnum.
              t_idoc_status-segfld = 'LIFNR'.     "<<
              t_idoc_status-uname = sy-uname.
              t_idoc_status-repid = sy-repid.
              APPEND t_idoc_status.
              t_return_variables-doc_number = f_idoc_control-docnum.
              t_return_variables-wf_param = c_retv_error_idocs.
              APPEND t_return_variables.


      Naimesh Patel

  • Posted on Oct 25, 2011 at 05:03 PM

    Both cases are possible.

    New vendors and also updates.

    The user exit should reached in both cases and everytime if I process a idoc with message type CREMAS

    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.