Duplicate line items

Hello,
We are in SRM 5.0 with server 550 with ECS.
We have faced a issued in a PO where all the line items have duplicated again.
1   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   1   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   2   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   2   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   3   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   3   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   4   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   4   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   5   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
   5   Material  Other Consulting  G903520  903520  3  each  73,00 GBP Per 1  73,00 GBP  30.09.2009  Expenses  6686400  C Finance      
Total Val.: 2.628,00 GBP  Tax Value: 394,20  GBP
any clue why it has happened, we were not able to replicate this scenario in quality systems.
Rgds,
Madhan

You could try searching OSS, however I think this is just a program error.
Debug the used badis to see why this is happening.
Kind regards, Rob Dielemans

Similar Messages

  • New error message :duplicate line item

    Hi,
    We have to add a new error message so that when we try to add a duplicate line item in our qty contract
    1.     we should not be allowed
    2.     we should get a error message u201Cduplicate line item not allowedu2019
    How to achieve this
    Thanks
    Arun

    Search this forum for "USEREXIT_SAVE_DOCUMENT" and "USEREXIT_SAVE_PREPARE".

  • Duplicate line item in Statement of account

    Dear All,
    Why there is duplicate line item in Statement of account?

    Hi Ajit,
    In your ECC system follow below path and set Availability check rule to "B" (full delivery).
    SPRO --> SD --> Basic Functions --> Availability Check and TOR --> Availability Check --> Availability Check with ATP Logic or Against Planning --> Define Default Settings
    Select your sales area and set Availability check rule to "B" (full delivery).
    This should fulfill your requirement.
    Rgds
    Sourabh

  • Print Line items twice in Check F110_Prenum

    Hi Experts,
    I need to print the Line items of the Payemnt advice, twice on the same page...
    Type   Window Content
    [Main] 1-10 Lines
    [Var]  Voided/Actual Check
    [Var]  <b>1-10 Lines</b> (Not printing)
    [Main] 11-20 Lines
    [Var]  Voided/Actual Check
    [Var]  <b>11-20 Lines</b>(Not printing)...........
    and so on....
    The problem is only that i am not able to print the lower (duplicate)line items...
    Pls suggest some technique....
    I have tried modifying the RFFOUS_C also... but the values  can be seen in debug mode only (not on Print Preview)
    I have already written this problem, sut still havent recieved any legible solution... Is this problem really so tough.. i wonder...
    Pls ask me if u need some more details....
    Thanks all in advance... all the helpful posts would be awarded points accordingly..
    Regards,
    Abhishek

    Yup ! There is a blank space at bottom which needs to be filled up with the content of main window on the same page...
    The last window name is 'FILE' and in this window we have a element called 'COPY'. Now what i did is i modified RFFOUS_C        to get all the itemlines in a particular itab say I_REGUP. In the Prog itself.. after the formular prints all the check contents and the loop for all the elements in main is done, i copy the REGUP to my I_REGUP.
    Now after this i Open a new form as
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                ARCHIVE_INDEX  = TOA_DARA
                ARCHIVE_PARAMS = ARC_PARAMS
                FORM           = T042E-ZFORN
                DEVICE         = 'PRINTER'
                LANGUAGE       = T001-SPRAS
                OPTIONS        = ITCPO
                DIALOG         = FLG_DIALOG
           IMPORTING
                RESULT         = ITCPP
           EXCEPTIONS
                FORM           = 1.
      IF SY-SUBRC EQ 1.              "abend:
        IF SY-BATCH EQ SPACE.        "form is not active
          MESSAGE A069 WITH T042E-ZFORN.
        ELSE.
          MESSAGE S069 WITH T042E-ZFORN.
          MESSAGE S094.
          STOP.
        ENDIF.
      ENDIF.
      LOOP AT I_REGUP.
        W_REGUP = I_REGUP.
        CALL FUNCTION 'WRITE_FORM'
             EXPORTING
                  WINDOW   = 'FILE'
                  ELEMENT  = 'COPY'
                  FUNCTION = 'APPEND'
             EXCEPTIONS
                  WINDOW   = 1
                  ELEMENT  = 2.
      ENDLOOP.
      CALL FUNCTION 'CLOSE_FORM'.
    After Executing what i find is, when i activate the debugger for the layout form... i can see all the values coming at that instance.. but id doent appear in the print preview...
    Hope u mast have got the scenario... else i can mail u the code copy and print preview for ur better view...
    Thanks for ur help !!
    Regards,
    Abhishek

  • Duplicate Shopping Cart  line items  - Supplier doesnt get copied ?

    Hi,
    we are on SRM7  extended classic scenario and while we use the "Duplicate" option to copy the existing line items in a shopping cart then the supplier doesn't get copied to new line item, field remains blank? is it a standard behaviour?
    what are the steps needed to make this happen ? appreciate your help in this regard.
    Thanks,
    Maverick

    Hi
    In SRM , if you copy the line item all item data must copy including suppliers.
    step by step tell us
    like
    1 create a shopping cart describe requirement
    2. manually assigned a source of supply - assigned a vendor
    3. copy the line item into another one
    4. in the latest line item supplier was not copied.
    The behavior of copying/pasting or duplicating items in a SC is different depending on the status of the SC
    Note 1137292 - Inconsistency when duplicating items
    Muthu

  • In Line Items if any duplicate reocords found don't delete

    In Line Items if any duplicate reocords found don't delete   catch those records and display in output as Warning message.
    PO      line item
    123     1
    123     2
    123     3
    123     1
    134      1
    in the above scenario there are 1 line item duplicate record . I want to catch that and display it as an Error / Warning message and    don't process that record continue to the next PO 134 like that.

    The below code works considering the duplicates of both f1 and f2.
    if you only require f1.then change the control break statements to f1.
    DATA:BEGIN OF itab OCCURS 0,
          f1 TYPE char3,
          f2 TYPE char1,
        END OF itab.
    DATA:wa LIKE LINE OF itab.
    data:count type i.
    wa-f1 = '123'. wa-f2 = '1'.APPEND wa TO itab.
    wa-f1 = '123'. wa-f2 = '2'.APPEND wa TO itab.
    wa-f1 = '123'. wa-f2 = '3'.APPEND wa TO itab.
    wa-f1 = '123'. wa-f2 = '1'.APPEND wa TO itab.
    wa-f1 = '134'. wa-f2 = '1'.APPEND wa TO itab.
    SORT itab ASCENDING.
    LOOP AT itab.
      AT NEW f2.
        count = 0.
      ENDAT.
      ADD 1 TO count.
      AT END OF f2.
        READ TABLE itab INTO wa INDEX sy-tabix.
        IF count = 2.
          write: 'E'.
          "move the error records.
        ELSE.
          Write:'S'.
          "Process the records
        ENDIF.
      ENDAT.
    ENDLOOP.

  • Duplicate of unloading point info in PR for line items

    Hi
    We have a Vendor Stock Inventory (VSI) scenario where when we we create Reservation for VSI material then PR is getting created automatically.
    Now we found out that when we create reservation for multiple line items giving different unloading point but when single PR is getting created for mulitple line items , all line items have same unloading point which is incorrect behaviour beacuse while creating reservation we have given different unloading point on line items.
    We are using bapi BAPI_REQUISITION_CREATE to create PR.
    Any clue to this problem . Is this standard SAP bug?? If yes any OSS note on this.
    Regards,
    Ashish

    There was bug in the exit program and this is now resolved.

  • Line item is not getting saved automatically

    Hi experts,
                     I have written below bdc program for Tcode cs01.
    REPORT ZM_BDC_CSO1
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    TYPE-POOLS: TRUXS.
    TYPE-POOLS: SLIS.
    CONSTANTS C_X(1) TYPE C VALUE 'X'.
    DATA: GT_HEADERT  TYPE SLIS_T_LISTHEADER,
          GS_HEADERT TYPE SLIS_LISTHEADER.
    DATA : FNAME TYPE STRING.
    DATA : WLV_FILE TYPE RLGRAP-FILENAME.
    *DATA : WT_TEST LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    DATA : T_INTERN TYPE STANDARD TABLE OF ALSMEX_TABLINE,
           W_INTERN TYPE ALSMEX_TABLINE.
    TYPES : BEGIN OF X_MAT,
                 MATNR(18) TYPE C,
                 PLANT(4) TYPE C,
                 BOM_USAGE TYPE STLAN,
            END OF X_MAT.
    TYPES : BEGIN OF X_BOM,
                 MATNR1(18) TYPE C,
                 ITM_NO(4) TYPE C,
                 ITM_CAT(1) TYPE C,
                 BOM_COMP(18) TYPE C,
                 QTY(18) TYPE C,
            END OF X_BOM.
    DATA : T_MAT TYPE STANDARD TABLE OF X_MAT,
           W_MAT TYPE X_MAT.
    DATA : T_BOM TYPE STANDARD TABLE OF X_BOM,
           W_BOM TYPE X_BOM.
    DATA :   FNAM(30) TYPE C.
    DATA :  CNT TYPE STRING,
            VAR(2) TYPE C .
    DATA : INI TYPE C VALUE '0' .
    DATA: NEW_MARK TYPE BDCDATA-FNAM.
    DATA: COUNTER TYPE I.
    DATA : ITEM_NO(4) TYPE N.
    DATA :  IDXL TYPE SY-TABIX.
    DATA : GV_PFILE TYPE STRING.
    DATA : GV_RAW TYPE TRUXS_T_TEXT_DATA.
    DATA : GV_FILE TYPE RLGRAP-FILENAME,
           GV_FLAG(1) TYPE C.
    DATA : GW_BDCDATA  TYPE BDCDATA,
           GT_BDCDATA  TYPE STANDARD TABLE OF BDCDATA.
    DATA: GS_RETURN TYPE YV_MESSAGES,
          GT_RETURN TYPE STANDARD TABLE OF YV_MESSAGES.
    DATA: GV_MTEXT TYPE STRING.
    DATA: GW_FIELDCAT        TYPE SLIS_FIELDCAT_ALV,
          GT_HEADERFIELDCAT  TYPE SLIS_T_FIELDCAT_ALV.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_PATH TYPE RLGRAP-FILENAME,
                 P_MODE TYPE CTU_PARAMS-DISMODE DEFAULT 'A'.
    SELECTION-SCREEN: END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PATH.
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
       IMPORTING
         FILE_NAME           = P_PATH .
    INITIALIZATION.
      REFRESH: T_MAT, T_BOM,T_INTERN.
      CLEAR: W_MAT,W_BOM,W_INTERN,IDN,FLAG.
    *DATA :  T_INTERN TYPE STANDARD TABLE OF ALSMEX_TABLINE.
    START-OF-SELECTION.
      PERFORM UPLOAD_FILES.
      PERFORM BOM_UPLOAD.
      PERFORM ITEM_DATA.
      PERFORM DISPLAY_LOG.
    *&      Form  BOM_UPLOAD
          text
    -->  p1        text
    <--  p2        text
    FORM BOM_UPLOAD.
      SORT T_INTERN BY ROW COL.
      LOOP AT T_INTERN INTO W_INTERN.
        CASE W_INTERN-COL.
          WHEN 1.
            W_MAT-MATNR = W_INTERN-VALUE.
            W_BOM-MATNR1 = W_INTERN-VALUE.
          WHEN 2.
        W_BOM-PLANT = W_INTERN-VALUE.
            W_MAT-PLANT = W_INTERN-VALUE.
          WHEN 3.
        W_BOM-BOM_USAGE = W_INTERN-VALUE.
            W_MAT-BOM_USAGE = W_INTERN-VALUE.
          WHEN 4.
            W_BOM-ITM_NO = W_INTERN-VALUE.
          WHEN 5.
            W_BOM-ITM_CAT = W_INTERN-VALUE.
          WHEN 6.
            W_BOM-BOM_COMP = W_INTERN-VALUE.
          WHEN 7.
            W_BOM-QTY = W_INTERN-VALUE.
        ENDCASE.
        AT END OF ROW.
          APPEND W_BOM TO T_BOM.
          APPEND W_MAT TO T_MAT.
          CLEAR : W_BOM, W_MAT.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " BOM_UPLOAD
    *&      Form  ITEM_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM ITEM_DATA.
      DATA : INT TYPE I.
      DELETE ADJACENT DUPLICATES FROM T_MAT COMPARING MATNR.
      SORT T_MAT BY MATNR. "HEADER DATA
      SORT T_BOM BY MATNR1. "ITEM DATA
    *CLEAR : COUNTER, ITEM_NO.
    *break naresh.
      LOOP AT T_MAT INTO W_MAT.
        REFRESH GT_BDCDATA.
        CLEAR   GW_BDCDATA.
        PERFORM HEADER_DETAILS.
        LOOP AT T_BOM INTO W_BOM WHERE MATNR1 = W_MAT-MATNR.
          CNT = CNT + 1.
          if CNT LE 9.
          CONCATENATE  '0' CNT INTO VAR.
          ELSE.
          VAR = CNT.
          ENDIF.
          ADD 1 TO COUNTER.
          ITEM_NO = 10 * COUNTER.
          OVERLAY ITEM_NO WITH '0000'.
          W_BOM-ITM_NO = ITEM_NO.
          PERFORM ITEMSET1.
          CLEAR VAR.
          PERFORM SCREEN1.
        ENDLOOP.
        CLEAR V_CNT.
        PERFORM SCREEN_DATA.
      ENDLOOP.
    ENDFORM.                    " ITEM_DATA
    *&      Form  HEADER_DETAILS
          text
    -->  p1        text
    <--  p2        text
    FORM HEADER_DETAILS.
      PERFORM BDC_DYNPRO      USING 'SAPLCSDI' '0100'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RC29N-STLAN'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'RC29N-MATNR' W_MAT-MATNR.
                                 'lejn44001'.
      PERFORM BDC_FIELD       USING 'RC29N-WERKS' W_MAT-PLANT.
                                 '4600'.
    PERFORM BDC_FIELD       USING 'RC29N-STLAN' W_MAT-BOM_USAGE.
                                 '1'.
    PERFORM BDC_FIELD       USING 'RC29N-STLAN' '1'."W_MAT-BOM_USAGE.
                                 '1'.
    *perform bdc_field       using 'RC29N-DATUV'
                                 '22.06.2010'.
      PERFORM BDC_DYNPRO      USING 'SAPLCSDI' '0110'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'RC29K-BMENG'
                                    '1'.
      PERFORM BDC_FIELD       USING 'RC29K-STLST'
                                    '1'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RC29K-EXSTL'.
      PERFORM BDC_DYNPRO      USING 'SAPLCSDI' '0111'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RC29K-LABOR'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
    ENDFORM.                    " HEADER_DETAILS
    FORM UPLOAD_FILES.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME                      = P_PATH
          I_BEGIN_COL                   = 1
          I_BEGIN_ROW                   = 2
          I_END_COL                     = 7
          I_END_ROW                     = 100
        TABLES
          INTERN                        = T_INTERN
    EXCEPTIONS
      INCONSISTENT_PARAMETERS       = 1
      UPLOAD_OLE                    = 2
      OTHERS                        = 3
      IF SY-SUBRC <> 0.
        WRITE 'Path of Excel file is not correct'.
        EXIT.
      ENDIF.
    ENDFORM.                    " UPLOAD_FILES
    FORM DISPLAY_LOG.
      DATA: LV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    Design the layout
      LV_LAYOUT-ZEBRA = C_X. " alternative coloured lines
      LV_LAYOUT-COLWIDTH_OPTIMIZE = C_X. " Optimized column width
    Delete all warning messages
    DELETE IT_return WHERE Mtype = 'W' or Mtype = 'I'.
    Build Field Catalog
      PERFORM BUILD_FIELD_CATALOG.
    Display Log details
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM     = SY-CPROG
                I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
                IS_LAYOUT              = LV_LAYOUT
                IT_FIELDCAT            = GT_HEADERFIELDCAT[]
           TABLES
                T_OUTTAB               = GT_RETURN[]
           EXCEPTIONS
                PROGRAM_ERROR          = 1
                OTHERS                 = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF. "SY-SUBRC <> 0.
      REFRESH GT_HEADERT.
      CLEAR   GS_HEADERT.
    ENDFORM.                    " DISPLAY_LOG
    FORM BUILD_FIELD_CATALOG.
    ENDFORM.                    " BUILD_FIELD_CATALOG
    FORM BDC_DYNPRO USING PROGRAM TYPE SY-REPID DYNPRO TYPE SY-DYNNR.
      CLEAR GW_BDCDATA.
      GW_BDCDATA-PROGRAM  = PROGRAM.
      GW_BDCDATA-DYNPRO   = DYNPRO.
      GW_BDCDATA-DYNBEGIN = 'X'.
      APPEND GW_BDCDATA TO GT_BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM TYPE ANY FVAL TYPE ANY.
      IF FVAL <> ''.
        CLEAR GW_BDCDATA.
        GW_BDCDATA-FNAM = FNAM.
        GW_BDCDATA-FVAL = FVAL.
        APPEND GW_BDCDATA TO GT_BDCDATA.
      ENDIF.
    ENDFORM.                    "BDC_FIELD
    FORM ITEMSET1.
    *cnt = '(01)'.
    *************commented******************
      PERFORM BDC_DYNPRO      USING 'SAPLCSDI' '0140'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RC29P-POSTP(03)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
    **********28.06.2010**********************
      CONCATENATE 'RC29P-IDNRK(' VAR ')' INTO NEW_MARK.
      PERFORM BDC_FIELD USING NEW_MARK W_BOM-BOM_COMP.
      CLEAR NEW_MARK.
    *perform bdc_field       using 'RC29P-IDNRK(cnt)' W_BOM-BOM_COMP.
                                 'purchasecost'.
    *perform bdc_field       using 'RC29P-MENGE(01)' W_BOM-QTY.
                                 '20'.
      CONCATENATE 'RC29P-MENGE(' VAR ')' INTO NEW_MARK.
      PERFORM BDC_FIELD USING NEW_MARK W_BOM-QTY.
      CLEAR NEW_MARK.
    *perform bdc_field       using 'RC29P-POSTP(VAR)' W_BOM-ITM_CAT.
                                 'Z'.
      CONCATENATE 'RC29P-POSTP(' VAR ')' INTO NEW_MARK.
      PERFORM BDC_FIELD USING NEW_MARK W_BOM-ITM_CAT.
      CLEAR NEW_MARK.
    ********************************28.06.2010************
    *perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'RC29P-POSNR'.
    *perform bdc_field       using 'RC29P-POSNR' W_BOM-ITM_NO.
                                 '0010'.
    *perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'RC29P-POTX1'.
    *perform bdc_field       using 'RC29P-SANKA'
                                 'X'.
    *perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'RC29P-POSNR(01)'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '=FCBU'.
    ENDFORM.                                                    " itemset1
    *&      Form  screen_data
          text
    -->  p1        text
    <--  p2        text
    FORM SCREEN_DATA.
      CALL TRANSACTION 'CS01'  USING GT_BDCDATA  MODE  P_MODE UPDATE  'S'
                                         MESSAGES INTO GT_MESSAGES .
    ENDFORM.                    " screen_data
    *&      Form  SCREEN1
          text
    -->  p1        text
    <--  p2        text
    FORM SCREEN1.
      PERFORM BDC_DYNPRO      USING 'SAPLCSDI' '0130'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RC29P-POSNR'.
      PERFORM BDC_FIELD       USING 'RC29P-POSNR' W_BOM-ITM_NO.
                                 '0010'.
      PERFORM BDC_FIELD       USING 'RC29P-IDNRK' W_BOM-BOM_COMP.
                                 'PURCHASECOST'.
      PERFORM BDC_FIELD       USING 'RC29P-MENGE' W_BOM-QTY.
                                 '20'.
      PERFORM BDC_FIELD       USING 'RC29P-MEINS'
                                    'M'.
      PERFORM BDC_DYNPRO      USING 'SAPLCSDI' '0131'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RC29P-POTX1'.
      PERFORM BDC_FIELD       USING 'RC29P-SANKA'
                                    'X'.
    ENDFORM.                                                    " SCREEN1
    evrything is working fine. but after processing the line items for one material no. i need to save it manually then it goes back to initial screen and process takes place for the subsequesnt material no.
    e.g
    Material             BOM component   QUANTITY
    LEJN2689     PURCHASECOST     500
    LEJN2689     SOURCINGCOST     
    LEJN2689     INVRESERVE     
    LEJN2690     PURCHASECOST     600
    LEJN2690     SOURCINGCOST     
    LEJN2690     INVRESERVE     
    the above is the file type i am providing.
    for material LEJN2689 the component and quantity is uploaded but i have to click on 'save' button manuaaly then cursor goes back to initial screen for material LEJN2690.
    plz help.
    Regards,
    Ashmita Singh

    solved it!!!

  • How to update line items if it exceeds 17 during creation of SO in va01.

    Hi,
    I have implemented one logic in mv45afzz for updating IO (internal order) with respect to line items during creation of SO through VA01.
    It is working fine.
    My problem is: For first 17th line items it is working fine , but those line items which come after 17th not working.
    Please suggest.
    Thanks,
    Sakti

    Hi,
    Pls find the below code for your reference.
    LOOP AT xvbap INTO wa_xvbap.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            input  = wa_xvbap-matnr
          IMPORTING
            output = wa_xvbap-matnr.
        IF ( wa_xvbap-matnr = c_matno_1 OR
           wa_xvbap-matnr = c_matno_2 ) AND
           wa_xvbap-updkz <> 'D'.
    *Before changing container number first check first check the IO attached to
    *this container number fully settled or not.
          IF NOT yvbap[] IS INITIAL.
            SORT yvbap[] BY vbeln posnr.
            READ TABLE yvbap INTO wa_yvbap WITH KEY vbeln = xvbak-vbeln
                                                    posnr = wa_xvbap-posnr
                                                    BINARY SEARCH.
            IF sy-subrc = 0 AND
              ( wa_yvbap-arktx <> wa_xvbap-arktx OR
               wa_yvbap-z_container_no <> wa_xvbap-z_container_no.
              CALL FUNCTION 'CONVERSION_EXIT_OBART_INPUT'
                EXPORTING
                  input  = c_sdi
                IMPORTING
                  output = l_output1.
              CONCATENATE 'ORX'
                          wa_yvbap-z_container_no
                          INTO g_objnr1.
              SELECT SINGLE *
                          INTO wa_cobrb_sdi
                          FROM cobrb
                          WHERE objnr = g_objnr1 AND
                                konty = l_output1.
              IF sy-subrc <> 0.
                CONCATENATE 'ORY'
                              wa_yvbap-z_container_no
                              INTO g_objnr1.
                SELECT SINGLE *
                            INTO wa_cobrb_sdi
                            FROM cobrb
                            WHERE objnr = g_objnr1 AND
                                  konty = l_output1.
              ENDIF.
            ENDIF.
          ENDIF.
    *If the Io is fully settled, then can not change container number.
          IF wa_cobrb_sdi-ersja IS NOT INITIAL.
            MESSAGE s303(me) WITH 'Container can not be changed as IO already settled for' wa_yvbap-posnr.
            CLEAR:wa_yvbap,
                  wa_cobrb_sdi,
                  g_objnr1.
            PERFORM folge_gleichsetzen(saplv00f).
            fcode = 'ENT1'.
            SET SCREEN syst-dynnr.
            LEAVE SCREEN.
          ELSE.
    *Check container number is initial or not
            IF wa_xvbap-z_container_no IS NOT INITIAL AND tcode = c_va01.
              CONDENSE wa_xvbap-z_container_no.
    *Add 'X' to container number and serch for IO exist or not
              CONCATENATE c_x
                          wa_xvbap-z_container_no
                          INTO l_aufnr.
              SELECT SINGLE aufnr objnr
                         FROM aufk
                         INTO (g_aufnr,g_objnr)
                         WHERE aufnr = l_aufnr.
              IF sy-subrc = 0.  " AND wa_xvbap-arktx = l_aufnr.
                l_flag = 'X'.
              ELSE.
    *Add 'Y' to container number and search for IO
                CONCATENATE c_y
                            wa_xvbap-z_container_no
                            INTO l_aufnr.
                SELECT SINGLE aufnr objnr
                          FROM aufk
                          INTO (g_aufnr,g_objnr)
                          WHERE aufnr = l_aufnr.
                IF sy-subrc = 0.  " AND wa_xvbap-arktx = l_aufnr.
                  l_flag = 'X'.
                ELSE.
    *Display error message if Io was not found or forgot to enter IO in description field
                  MESSAGE s083(me) WITH 'IO was not found for' wa_xvbap-posnr.
                  PERFORM folge_gleichsetzen(saplv00f).
                  fcode = 'ENT1'.
                  SET SCREEN syst-dynnr.
                  LEAVE SCREEN.
                ENDIF.
              ENDIF.
           ELSE.
            ELSEIF tcode = c_va01.
    *Display error message if user forget to enter container number
              MESSAGE s083(me) WITH 'container number for' wa_xvbap-posnr.
              PERFORM folge_gleichsetzen(saplv00f).
              fcode = 'ENT1'.
              SET SCREEN syst-dynnr.
              LEAVE SCREEN.
            ENDIF.
            IF l_flag EQ 'X'.
              CALL FUNCTION 'CONVERSION_EXIT_OBART_INPUT'
                EXPORTING
                  input  = c_sdi
                IMPORTING
                  output = l_output.
              CALL FUNCTION 'CONVERSION_EXIT_PERBZ_INPUT'
                EXPORTING
                  input  = c_ful
                IMPORTING
                  output = l_ful.
    *Fetch 1st line of settlement rule
              CALL FUNCTION 'CONVERSION_EXIT_OBART_INPUT'
                EXPORTING
                  input  = c_gl
                IMPORTING
                  output = l_gl.
              SELECT SINGLE *
                    INTO wa_cobrb_gl
                    FROM cobrb
                    WHERE objnr = g_objnr AND
                          konty = l_gl.
              IF sy-subrc EQ 0.
    *Populate values for second line settlement
                wa_cobrb-objnr = g_objnr.            "OBJNR
                wa_cobrb-lfdnr = '003'.
                wa_cobrb-konty = l_output.           "Category
                wa_cobrb-kdauf = xvbak-vbeln.        "Order No
                wa_cobrb-kdpos = wa_xvbap-posnr.     "Item No
                wa_cobrb-prozs = c_percent.          "Percentage
                wa_cobrb-perbz = l_ful.              "Settlement
                wa_cobrb-extnr = c_no.               "No
                wa_cobrb-gabpe = wa_xvbap-erdat+4(2).      "From period
                wa_cobrb-gabja = wa_xvbap-erdat+0(4).      "From Fiscal
                APPEND wa_cobrb TO gt_cobrb.
              ELSE.
    *Populate values for second line settlement
                wa_cobrb-objnr = g_objnr.            "OBJNR
                wa_cobrb-lfdnr = '003'.
                wa_cobrb-konty = l_output.           "Category
                wa_cobrb-kdauf = xvbak-vbeln.        "Order No
                wa_cobrb-kdpos = wa_xvbap-posnr.     "Item No
                wa_cobrb-prozs = c_percent.          "Percentage
                wa_cobrb-perbz = l_ful.              "Settlement
                wa_cobrb-extnr = c_no_1.               "No
                wa_cobrb-gabpe = wa_xvbap-erdat+4(2).      "From period
                wa_cobrb-gabja = wa_xvbap-erdat+0(4).      "From Fiscal
                APPEND wa_cobrb TO gt_cobrb.
              ENDIF.
              IF wa_cobrb_gl IS NOT INITIAL.
                wa_cobrb_gl-gbisp = wa_cobrb-gabpe - 1.
                wa_cobrb_gl-gbisj = wa_cobrb-gabja.
                APPEND wa_cobrb_gl TO gt_cobrb_gl.
              ENDIF.
         ELSEIF wa_cobrb-ersja IS NOT INITIAL.
           MESSAGE 'Container number can not be reassign' TYPE 'E'.
            ENDIF.
          ENDIF.
        ENDIF.
        CLEAR:wa_cobrb,
              g_objnr,
             wa_aufk,
              wa_cobrb_gl,
              wa_cobrb_sdi.
      ENDLOOP.
      IF l_flag EQ 'X'.
    *Create 2nd line for settlement rule.
        SORT gt_cobrb[].
        DELETE ADJACENT DUPLICATES FROM gt_cobrb[].
        IF NOT xvbak-vbeln IS INITIAL AND tcode = c_va01.
          IF NOT gt_cobrb[] IS INITIAL.
            CALL FUNCTION 'K_SRULE_SAVE_UTASK'   "IN UPDATE TASK
              TABLES
                t_cobrb_insert    = gt_cobrb[]
              EXCEPTIONS
                srule_utask_error = 1
                OTHERS            = 2.
    Thanks,
    Sakti

  • User Exit during Sales Order Creation - New Line Item needed

    I have a situation during the process of sales order creation. If a Material in a line item has say 27 EA and the Base Unit is EA. But the Sales Unit is CSE. Then whenever the user enters 27 EA and presses enter he should get two line items.
    The first line item needs to convert to maximum number of CSE posible and the rest will be the second line item with the remaining EA. The order isn't important but that is what is needed. Question is how do I approach this problem and code my user exit accordingly and where do I code it.
    I was looking at SAPMV45A and saw the program MV45AIZZ which is meant as a user exit for any PAI event handling. If anybody has encountered this kind of requirement can you please share your view on this.
    I will definitely reward points for useful answers.
    Clark

    Hello Mahendra
    The requirement is as follows :
    PART 1:
    Sales Order Enter: 
    1.     When a line item is entered on a sales order (VA01 or VA02), at enter, check the sales unit of measure (VBAP-VRKME).
    •     Do not check line items where item category (VBAP-PSTYV) = TANN, TAPS or ZTAP.  TANN are free goods that should not be considered for consolidation.  TAPS & ZTAP are lower level materials as a result of product selection.  They will be attached to a higher-level material with an item category of TAX, which is relevant for consolidation.
    •     Do not check items where VRKME <> EA
    2.     If VRKME = EA, go to MARM for MATNR.
    3.     Go to record where alternate unit of measure (MEINH) = CSE, get the value from the numerator field (UMREZ).
    4.     Divide the order quantity (VBEP-WMENG) by UMREZ.
    5.     If the result is greater than 1.0, the customer has ordered more than one case and a new line item needs to be added to the sales order for the case quantity.
    6.     Add a new line to VBAP for the same material with the case quantity.  If not a whole value, the remainder of eaches (bottles) should update the qty on the first item on VBAP.
    •     Part 1 is relevant for order types ZCA, ZOR, ZSO, RE, ZSM
    PART 2:
    Batch Job to run prior to the Delivery Due List:
    1.     Read VBUK for Delivery Status (LFSTK) = A (delivery not processed).  Get all of the document numbers (VBELN).
    2.     Go to VBEP for those document numbers to get the goods issue date for the order.  There will be many records in VBEP for the same sales order.  Look at all orders with a goods issue date (WADAT) of next day.
    3.     Go to VBAK for those document numbers to see if there are multiple sales orders for the same Sold To party (KUNNR).
    4.     For customers who have more than one order in VBAK, search all line items (for all orders).  If there are no duplicate materials across sales orders, do nothing.
    •     Do not check line items where item category (VBAP-PSTYV) = TANN, TAPS or ZTAP.  TANN are free goods that should not be considered for consolidation.  TAPS & ZTAP are lower level materials as a result of product selection.  They will be attached to a higher-level material with an item category of TAX, which is relevant for consolidation.
    •     Do not check line items where reason for rejection (VBAP-ABGRU) is not blank
    5.     If there are duplicate materials, go through the same logic as in part 1.  If the quantity across the sales orders adds up to greater than one case, add the appropriate quantity to a new line item on the first sales order.   If there is a remainder qty, update the line item on the first sales order with this qty. In this case, the quantities on the second sales order needs to be closed out with a reason for rejection code of 50, ‘Line Item Consolidation’. If there is no remainder,  update the qty on this item directly.
    •     Part 2 is relevant for order types ZOR, ZCA, ZSM
    •     This batch job will have to be run manually for Day Pick orders.  The end of this program should automatically kick off the delivery due list for Day Pick orders, shipping condition 02.
    Business Justification:
    The business requires that like order line items be consolidated to one line item prior to the order going to the warehouse for picking.  This will aid in picking at the warehouse as well as result in the customer invoice not reflecting more than one line item for the same material.  In the case where the customer has truly ordered more than a case, i.e;, 1 case, 2 bottles, the documents in SAP will still reflect 2 lines.

  • Last line item gets changed to first line item for cs01

    HI experts,
               I have writen a BDC for Tcode cs01.
    I am facing a problem in that.If sucppose there are 4 line items,
    the first three line itmes are getting uploaded correctly but the kast line item gets changed to first line item.
    below is part of my code.
    DELETE ADJACENT DUPLICATES FROM T_MAT COMPARING MATNR.
    SORT T_MAT BY MATNR. "HEADER DATA
    SORT T_BOM BY MATNR1. "ITEM DATA
    *CLEAR : COUNTER, ITEM_NO.
    LOOP AT T_MAT INTO W_MAT.
      REFRESH GT_BDCDATA.
      CLEAR   GW_BDCDATA.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR' W_MAT-MATNR.
                                 'lejn44001'.
    perform bdc_field       using 'RC29N-WERKS' W_MAT-PLANT.
                                 '4600'.
    perform bdc_field       using 'RC29N-STLAN' W_MAT-BOM_USAGE.
                                 '1'.
    *perform bdc_field       using 'RC29N-DATUV'
                                 '22.06.2010'.
    perform bdc_dynpro      using 'SAPLCSDI' '0110'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29K-BMENG'
                                  '1'.
    perform bdc_field       using 'RC29K-STLST'
                                  '1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-EXSTL'.
    perform bdc_dynpro      using 'SAPLCSDI' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-LABOR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    LOOP AT T_BOM INTO W_BOM WHERE MATNR1 = W_MAT-MATNR.
      cnt = cnt + 1.
      CONCATENATE  '0' CNT INTO VAR.
       ADD 1 TO COUNTER.
       ITEM_NO = 10 * COUNTER.
       OVERLAY ITEM_NO WITH '0000'.
       W_BOM-ITM_NO = ITEM_NO.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSTP(03)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    CONCATENATE 'RC29P-IDNRK(' var ')' INTO new_mark.
    PERFORM bdc_field USING new_mark W_BOM-BOM_COMP.
    clear new_mark.
    CONCATENATE 'RC29P-MENGE(' var ')' INTO new_mark.
    PERFORM bdc_field USING new_mark W_BOM-QTY.
    clear new_mark.
    CONCATENATE 'RC29P-POSTP(' VAR ')' INTO NEW_MARK.
    perform bdc_field USING new_mark W_BOM-ITM_CAT.
    clear new_mark.
    clear VAR.
      ENDLOOP.
    loop at T_BOM INTO W_BOM WHERE MATNR1 = W_MAT-MATNR.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR' V_CNT.
                                 '0010'.
    perform bdc_field       using 'RC29P-IDNRK' W_BOM-BOM_COMP.
                                 'PURCHASECOST'.
    perform bdc_field       using 'RC29P-MENGE' W_BOM-QTY.
                                 '20'.
    perform bdc_field       using 'RC29P-MEINS'
                                  'M'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    V_CNT = V_CNT + 10.
    ENDLOOP.
    CLEAR V_CNT.
      perform screen_data. " IS ALL ABOUT CALLING TRANSACTION......
      ENDLOOP.
    following is The input file format m providing.
    Material     Plant     BOM usage     Item No     Item Cat     BOM component     QUANTITY
    WRJN46106     4600     1     10     z     PURCHASECOST     10
    WRJN46106     4600     1     20     z     SOURCINGCOST     15
    WRJN46106     4600     1     30     z     INVRESERVE     12
    WRJN46106     4600     1     40     Z     INVRESERVE1     20
    in this the first 3 line items are coming correctly but the 4th one gets changed to
    first line item.
    e.g INVRESERVE1 changes to purchasecost.
    plz help.
    Thanks n regards,
    Ashmita singh.

    Hi Suneel,
    I hardly can't believe that. There must be an mistake by your own in the smartform itself. Would you please share some screens or better, the smartform-XML itself. You can pass out everything else and just share the table and a dataset to try this.
    I'm pretty sure that there is something wrong with the settings or even the loop itself. I never faced a problem like that or even heared about such things.
    I would love to have a look inside.
    Before you share it, create a new one with just the table inside and try it with the same data. Perhaps it is just of to much folders or something like that, so the generating comes in trouble.
    Regards
    Florian

  • EBP PO : Unable to duplicate/copy  item,GR_NON_VAL issue

    Hello,
    I am using SRM 5.O .
    In Process PO when I go to create the PO with more than one line item following issue comes :
    When I entered one line item and check its ok when I click on  <b>Duplicate Selected</b> Item or <b>Copy</b> push button than check  following error appears .
    <b><i>Flag 'Automatic Settlement' at item level is different; Change not possible 
    Flag 'Invoice Expected' at item level is different; Change not possible </i></b>
    Thanks ,
    Sachin
    null
    null

    Hello,
    I have debugged whole program and found when there is single line item everything is fine & when i clicked on <b>Duplicate Selected  Item</b> the value of GR_NON_VAL indicator set in first line item and second Items indicator as it is blank .Where single line Item indicator was blank .
    When I am copying the line item than its working OK .
    Due to mismatch in items followinng program raise error message .
    PERFORM downward_inheritance USING     p_hgp_ecom
                                                 p_hgp_icom
                                                 p_guid
                                                 p_object_type
                                                 p_itm_icom
                                                 ls_igp_icom
                                                 p_changed
                                       CHANGING  ls_header.
    Is there any idea why system behaving like this ?
    Thanks,
    Sachin

  • Duplicate catalog item; price editable

    Hi All,
    I have a client running SRM server 550; they have an issue that when a user creates a shopping cart and adds a catalog item, the price is not editable (as it should be). However, if the user then creates a copy that item, using the "duplicate" button in the SC, then the price becomes editable.
    It appears this is a known problem and there is a solution for this (note 1386176) for SRM7.0, does anyone know if the same solution can be applied for SRM 5.0, or if there is an alternative solution?
    Thanks.

    Tom,
    I suggest you open a message with SAP.  The problem here while copying the SC catalog line item is creating the condition type manual and hence it might be allowing you to edit the price.  If my guess is correct, then you would be able to change the price on PO as well (obviously you should be on extended classic).
    Bu using the Control UI Badi, and having an extended classic scenario, you may be deferring the problem from the SC to PO.  You might want to do the same kind of development on the PO also.
    Else, SAP has fixed the same issue for us on SRM 6.0.  Of course, we could have done the meta data development on SRM 6.0 which we avoided and SAP gave a fix which is applicable for SRM 7.0 also.
    Thank You,
    DV

  • Repair request for Delta load? Orders missing in Billing line Items

    Hi
    I am using BW 3.5; Some Orders are missing in BW for Billing line item reports (2LIS_13_VDITM) according to the users.
    The report is based on Cube directly, ODS is not used. I planned to do a repair full request for this month's data so as to get the missing orders.
    Could you please advice me on correct procedure to do that? Delta loads runs every day and todays delta is completed.
    Thanks and BR
    P.B

    While it's usually recommended to execute setups during "quiet time", it's not required. Especially in this case. Since you're going to be restricting the setup to only extract a range of Billing Documents that are representative of the dates of data missing (or purely the identified missing documents), there is no need to wait for "quiet time" because you'll pick up the data either in your Full Repair extract or in the delta extract. Depending on how the target InfoProvider for this data is setup (cumulative v. non-cumulative), you may have to look out for duplicate data.
    My recommendation would be to run your setup for only those documents that have been identified as missing. That way, you're limiting the amount of data that's required to be extracted to the setup table and then into BW, but also will remove any risk of duplicate data in your target InfoProviders.

  • Mapping of Multiple Line Items

    Hello All,
    While trying to post a purchase order creation into R/3, there are several line items in the purchase order. Each has different quantity, GL account, cost center and unit price. So how should I map it to the target field.
    Occurence of order detail
    order detail                      0..1
          list of item details       1..1
          Item detail                  1..unbounded
          base item detail           1..1
          line item number          1..1
          buyer line item num      1..1
    So occurence of buyer line item number is not unbounded. so how can I duplicate this buyer line item number?
    For example, In the XML source message I have 5 line items.....
    for line item one, I have quantity A, GL account B, cost center C and unit price D,
    for line item two, I have line item X, Quantity Y, GL account Z, Cost center M and unit price N, etc
    When I am trying to map I am able to pick only the first line item. Can anyone throw some light on how I should map all the line items data?
    If anyone can help me with mapping of this. A bit in detail please
    Regards,
    Neelima
    CSC

    Hi Neelima,
    Check out this blog....
    /people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool ( with PO only)
    Multiple line items are generated basically using Context.
    Hope this will help.
    Let me know if you need more details.
    Nilesh

Maybe you are looking for

  • Creating an RDI  file from SAP script

    Hello All, I would like to create an RDI file from SAP Script. Please can anyone let me know how do we do it programmatically. I am aware of the option of setting RDI parameter to 'X'. However my requirement is to allow user to have a print preview o

  • Accessing device registers and microcontroller registers using java

    We are writing an application that needs to work with any kind of microcontroller(more specifically targetted towards 8051 and 80188/86 microcontrollers) in a constrained memory environment with code/data not more than 128 KB or at the most 256 KB. W

  • [Solved] Bash scripting and sed substitution

    Hello! I am writing a script in order to substitute strings from one array to another one in texts. For only one case it is working as the following : sed '/ā/s/\(.*\)ā\(.*\)/\1a\21/g' temp.txt > temp2.txt which converts ā in a word by the same word

  • Knowledge Management Demo Video / Documenation

    Hi All, My company is looking to expand into SAP's Knowledge Management.  Is there any demo video or documentation out there that clearly describes the Knowledge Management's capabilities?  I searched SDN and didn't find anything along the lines of a

  • How to fix NIS domain name not set after upgrade

    I finally updated after thousands of years. As pacman was spewing, I noticed that it moved /etc/conf.d/nisdomainname to .pacsave. Uh, whatever, says I. Must be a package issue. So I just reboot...and of course ypbind can't connect to anything because