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

Error loading 0Material_attr with blank spaces

Hello Everyone,

During the DTP execution i get the following errors

* Record filtered in advanced as rerris records with the same key exist (message RSM2722)

* Data Package / Status " Processed with erros" (message RSBK257)

After analysis we come to know that we are getting 2 material number with the same codeLike : PMK001 created by rishi and PMK001 created by harsh. the difference being there are 2 spaces atthe end of second material code. Thus till PSA level it comes fine but after executing the DTP it throws an error.

Now in the field routine I can manage like this

RESULT = SOURCE_FIELDS-MATERIAL.

CONDENSE RESULT NO-GAPS.

This will remove the blank spaces from the end of the material. Kindly rectify me if I am wrong with the coding. Help me with proper code if there is any mistake.

Now inorder to add a character after PMK001 created by harsh what do I have to do if in coding then can anyone help me with fullcode.Also can we do anything applying the Formula field. Thanks in advance.

Regards

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 27, 2016 at 01:40 PM

    Hi,

    First of all this its an error in ERP, over there they have to restrict the field of material for not to generate spaces, if not it will occur on various materials.

    Regarding the code you can use the below one:

    DATA: v_prod_descr.

    v_prod_descr = tran_structure-prod_descr.

    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf IN v_prod_descr WITH ' '.

    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN v_prod_descr WITH ' '.

    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>vertical_tab IN v_prod_descr WITH ' '.

    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>newline IN v_prod_descr WITH ' '.

    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>form_feed IN v_prod_descr WITH ' '.

    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>backspace IN v_prod_descr WITH ' '.

    Regards,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2016 at 10:17 AM

    Hi,

    First because of space at the end I am getting error.so I am thinking for the code I have mention in my original question to use.

    But after using that if I need to add a letter at the end of the material code which is creating problem then what code I need to add and where i need to add.

    Correct me if i am wrong somewhere.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI Gorka,

      Thanks for your answer just let me know if the code I have mentioned is correct or not i.e

      RESULT = SOURCE_FIELDS-MATERIAL.

      CONDENSE RESULT NO-GAPS.

      Also in R/3 functional people are unable to edit the already created record. So what is the next possible solution.

      I am trying from my side to rectify this in BW by removing the blank spaces and then trying to add a Character at the end of that Material code. Can you help me with the code to add a character at the end or suggest some solution.

      Thanks.

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.