Problem while creating new item in the sale order  in case of  Thirdparty

Dear Gurus
The following error is coming
while adding the new item with quantity  in the sale order in case of third party  .
Error Info...   00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC
Update key...   482ACBD89C7D0067E10080000A8C681C
Can give any idea abt this.
Rgds
Surya

Hi
This error comes up due to number range problem in the
tables.
As you have said this is a third party Sales order, just check if this is relevant to the PR being generated or the Sales order getting created.
Check the Current number of the PR document type in the EBAN table & check if it is the same for the Number ranges in customizingin OMH7.
If they are not the same... & the current number in OMH7 is smaller than the Number in the table EBAN , you need to change the current number  equal to the EBAN table.
If this is the case fior sales orders similarly check for Sales order table & sales order number range object.
reward points if useful
Thanks & Regards
Kishore

Similar Messages

  • How to create new subsite while adding new item to the list by using javascript?

    hi,
    I hav a task ie, when I add item to the list then subsite will create with that list item title and description . So By using javascript, I have to create subsite while adding new item to the list.
    Help me to solve this.
    Thank you, 

    Is your item getting added through Javascript client object model ? If yes, you can write in the success delegate of your list creation method the logic to create the subsite.
    function CreateListItem()
    var clientContext = new SP.ClientContext.get_current();
    var oList = clientContext.get_web().get_lists().getByTitle('List Name');
    var itemCreateInfo = new SP.ListItemCreationInformation();
    this.oListItem = oList.addItem(itemCreateInfo);
    oListItem.set_item('Title', 'My New Item!');
    oListItem.set_item('Body', 'Hello World!');
    oListItem.update();
    clientContext.load(oListItem);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.CreateListItemOnSuccess), Function.createDelegate(this, this.onQueryFailed));
    function CreateListItemOnSuccess() {
    var subsiteTitle = oListItem.get_item('Title');
    //Logic to create a subsite
    function onQueryFailed(sender, args) {
    I have added a sample flow for the above scenario. Have a look at the following lnk for how you can craete a subsite using ecmascript.
    http://ravisoftltd.wordpress.com/2013/03/06/sharepoint-2010-create-site-with-ecma-script-with/
    Geetanjali Arora | My blogs |

  • Error while creating and opening a ERP sales order in SAP CRM

    Hi,
    I am getting an error while creating or opening a ERP sales order from SAP CRM.
    "Creation of the ERP Transaction failed" this is the error i'm getting while creating. when i try to open an existing sales order I'm getting a dump.
    Attached the dump screen shot. From the dump analyasis it seems the transactions are not loaded through LORD framework.
    The RFC connection seems to fine as i have tested accessing an ECC RFC FM through a sample program and its successful..
    please help..
    Thanks
    Krishna

    Hello Krishna,
    Did you get a solution to this? I have the same dump message.
    As a matter of fact, we already use ERP Sales Order and it works fine. But I have recently configured a new sales order document type, and the dump occurs only for this new Z order type.
    Thanks a lot,
    Luis.

  • Delivery doc creation for a selected line item of the Sales order

    Hi folks,
        Can any one help me in how to create a delivery order for a selected line item of the Sales order.My requirement is the request comes from the web browser where a sales document and details of the items are shown the user select one line item and request for delivery create of that particular SO doc.I have used couple of FM to create delivery but the delivery create is depend on the schedule line dates so iam unable to figure out where exactly i can distinguish between the line items.
    Example:
    SO:- 11193645
    Line item -1 has 2 schedule line 06/11
                                     06/13
    Line iteam-2 has 1 schedule line 06/12
    so if i try to create Delivery doc for date 06/12
    it creates partially for line 1 and line 2.
    but my requirement is i wanted to create SO for only line item 1 as i wanted to process Del Doc for only line item 1.
    If you have any idea please help me.

    hi ,
    You can develop a customised FM to process the Idoc data .
    1. Read the Idoc data into internal table for the line items which need to be delivered .
    2. Run BDC for transaction 'VL01N' ( delivery creation ) through which  eliminate the line items which are not in internal table and save the delivery document
    Note : Because in VL01N , you specify the sales document with respect to which you want to perform delivery hence automatically all items are copied to the delivery document .
    During BDC recording , select items by " MOVING TO TOP"
    and then deleting the selected item
    If you face problem in BDC recording , i can help u that too .

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • Sample Material in the 3rd Line item of the Sales Order

    Hi,
    We have configured the system in the sales order as follows.
    1. Commercial Material
    2. Bonus Material.(ie Free Material)
    Now, i want to add the 3rd line item in the sales order as Sample with different Material number. How go about this. kindly let me.
    Regards
    Ravi

    Hi there,
    Enter the material in the sales order & change the item catg manually in VA02.
    But free goods & sample materials are dealt differently..
    Freegoods is entered as TANN item catg along with nornam TAN item in standard order OR.
    But sample materials or free of charge items are processed through different order type FD for eg.
    Even thought the item catg proposed in FD is TANN,, the whole process will not have pricing as TANN items arenot relevant for pricing.
    Regards,
    Sivanand

  • SharePoint Designer 2013 workflow - creating new items in the list

    Hi,
    I need to create a workflow in SharePoint designer 2013. Basically the flow is like that:
    There is a Request List where people submit their requests. The requests have status: Submitted and Completed.
    Once the status goes to 'Completed" there should be a workflow triggered that creates an entry in another list; VoC list and populate VoC columns. Additionally there should be an email send to the requestor that the request has been processed.
    I tried to do that but I failed - what do I do wrong? It keeps telling me that there is an error in workflow.
    Could you, please help me? Thank you.
    Thank you.
    Kind regards,
    Jowita

    With this command it populated the Voc list. But when I tried to add additional fields, the workflow did not work. Fo example, I've got a column "Requestors Name" in Request List and I would like the same column in Voc List to be automatically
    populated with the data from Requestors List. I set Field Requestors name to Value Current item:Requestors name but it did not work :-(
    What do you mean by "VoC column is already created in VoC list"?
    And one additional question: is it possible for the workflow to automatuically create new columns in the VoC list?
    Hi Jowita,
    We could use workflow to populate values in column but not populate new columns, so the column should be created in list manually before workflow.
    As I understand now, you need to use workflow to populate at least two columns in another list, and one is person or people type. I captured a screenshot for your reference, pp column is in person or group type in both two lists, please set return
    type as Display name:
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Problem While Creating New system

    Hi.
    i have downloaded sap netweaver 7.01(trail version) from SCN.
    installation was successful.
    Frontend GUI was installed in System Drive(C Drive)
    and Netweaver was installed in D Drive
    i have started the application server.
    in the logon pad what are the details i need to enter while creating new systems in logon pad.
    i followed help and typed the same info as in the f1 help.
    in connection tab:
    connection type: Custom Application Server
    System connection parameters:
    Description: SAP
    Application Server : u9cmain (as in f1 help)
    System Number: 00(as in f1 help)
    System ID: u9c(as in f1 help)
    SAProuter Sring: (empty)(as in f1 help)
    after giving this details. when i logged in it shows this "hostname u9cmain unknown, check your application server name"
    how can i rectify this error. where can i check my application server name...
    help me out plz.

    >i followed help and typed the same info as in the f1 help.
    You can't use the same host name and SIDs as per help under F1
    Configure as below:
    Description: SAP (You can use anything)
    Application Server : (your computer name or IP address)
    System Number: (has to be 2 digit, and which numbers you have assiged while installation)
    System ID: (your instance name)
    SAProuter Sring: (not required)

  • Problem in blocking that amount in the sales order through routein

    Dear Experts,
    We are facing a problem in Routine,
    We have developed a Z rebate module in that we are saving the accrual value for a perticular customer in "Z" Table.
    We are having a senerio of adjusting that perticular accrued amount in the next month sales order as a discount  at the item level. In table  itself we fix this much amount as to flow to sales order for a Perticular material (EX- for 100001 material 5 rs per TON).
    We have devaloped 901 routine that will go to "z" table and check any accrued amount is there then depending on the quantity ordered it will take accrual amount (simultanusly it will block the respective amount in the "z" table) and it will come and update in sales order pricing. Once we save sales order then it will reduse the perticular amount in from "z" table.
    Now we are facing a problem, when we create a sales order first time depending on quantity routine will pull the value from "z" table and it will block respective amount in the "z" table. but before saving the sales order if you change the quantity again (EX- from 100 qty to 200 qty) then the routine is not pulling any value because the amount is already blocked. 
    Can any one tell me how check in run time this was the earlier quantity and this is changes quantity Or is there any logic to block that perticular amount.
    Regards
    Nagesh

    HI Sree
    Could you please justify your post stating
    "Now we are facing a problem, when we create a sales order first time depending on quantity routine will pull the value from "z" table and it will block respective amount in the "z" table. but before saving the sales order if you change the quantity again (EX- from 100 qty to 200 qty) then the routine is not pulling any value because the amount is already blocked. "
    Your discount is based on qty, so when you are adding new item means order qty increased, so discount is applicable.
    Or please put your requirement clearly

  • 1 line item in the sales order ship to different shipping address

    Hi,
    Our customer A have 3 different branches (meaning 3 different shipping address).
    During the creation of the sales order for 1 material A, I want to ship 50pc to this customer A:
    10pc to address A1
    20pc to address A2
    20pc to address A3
    In my sales order, is there a way I just create 1 line item with the order qty 50pc for this material A, but split into 3 schedule line with 3 different ship to address?
    I know there is alternate way where I create 3 different line item (with order qty 10, 20 and 20) and change the ship to address in the Item -> Partner tab. But using this method, I have to create 3 times of the same material in 1 sales order, just with the different shipping address.
    I want to know is there a way I just need to create 1 line item?
    Kindly please advise. Thank you.

    Hi there,
    When you have 3 different ship-to address, system will anyway create 3 different deliveries. This is coz if the header data in shipping (ship-to) is different, system will split the deliveries. Routes are different to 3 ship-to addresses & they cannot be combined in the same delivery.
    So as mentioned in above thread, create 3 different line items or create different sales orders all together for different ship-to parties.
    Regards,
    Sivanand

  • Creating line item for a sales order in user exit

    Hi
    I have to create a line item through user exit "userexit_save_document_prepare" when saving the sales order.I am doing this by appending a row to the internal table XVBAP in the user exit.
    The row is getting appended to the internal table but the line item is not getting created in the sales order .I dont getting any error also.
    Can anyone tell me what could be the reason for this and is there any other means by which i can create a line item through the user exit.

    You have to set the creation flag UPDKZ to 'I'.
    to correctly use the user exit refer to OSS note 0381348 Using user exit, customer exit, VOFM in SD.
    pls reward if helpful
    Roberto

  • Creating line item in a sales order by user exit

    Hi
    I have to create a line item through user exit "userexit_save_document_prepare" when saving the sales order.I am doing this by appending a row to the internal table XVBAP in the user exit.
    The row is getting appended to the internal table but the line item is not getting created in the sales order .I dont getting any error also.
    Can anyone tell me what could be the reason for this and is there any other means by which i can create a line item through the user exit.

    You may also need to add an entry to the internal table XVBEP for the schedule lines.

  • Dump after creating new header text on sales order and invoice.

    Hello,
    We have created one header text on sales order and the same text for invoices, on VOTXN customizing.
    Testing the new text, system let us save the text fine, but later, if we display the text, system give us dump error.
    My question is, after transport the customizing to the next environment, is necessary run a standard program. Since VOTXN, we have generated the new access created, but dump appear displaying text header tab.
    Any help on this?
    Thanks in advance

    Hello Customer master table man
    1) Did you review the dump analysis- ST22?  Do that because the dump amy or may not be related to the Text config changes.
    2) You are also mentioning about transporting?  Did you already transport and are facing this issue in the target client or is it happening in the source client and you want to avoid it in the target? OSS note 1117467 throws light on transporting issues.
    Review the following OSS notes:
    548615 - FAQ: Text determination in SD II
    548517 - FAQ: Text determination in SD I
    1117467 - Text Customizing change not transferred in target system II
    970153 - Change to Customizing text not transferred to target system
    Hope this helps.

  • How to create an Invoice for the sales order using the T-Code VF01

    Hello Experts,
    How to create an Invoice for a sales order using the T-Code VF01?
    Thanks in advace,
    Suma

    hi,
    Make the following settings-
    1. Create sales document and billing type
    2. assign billing type in sales document type config VOV8
    3. Activate itemcategory as sales order related billing
    4. Maintain copy control header and item level between sales order and billing
    5. Maintain pricing procedure for sales order and billing
    6. Define Output procedure in case to print invoice
    Regards
    Goutham

  • Production Order and Internal Order for each item of the sales order

    Hi
       I am developing Make To Order Report where I have to display the MTO Line Items and non MTO Line Items. For non MTO Line Items I have to display Internal order with Planned and Actual Costs and also Production Order with Planned and Actual Costs. Could anybody tell how to get the Internal order no and production order with Planned and Actual costs for each line item for a sales order.
    Thanks
    Naga

    Hi,
    You can get the Production orders, Planned orders, Internal orders generated for Sales order item from AFPO table (use fields KDAUF-Sales order number & KDPOS-Sales order item). Then to identify the order type use order category (AUTYP) from table AUFK.
    Once you have the Production/internal order, you can ge the cost from COSS and COSP table. Use the object number from AUFK to get the cost entries from COSS & COSP.
    You can use the following sample code as reference.
    Hope this is helps.. (Don't forget to mark it... )
    Form GET_COSTS                                                       *
    Get the material cost, labour hours and the labour cost for the      *
    sales order material.                                                *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_COSTS.
      DATA V_OBJNR LIKE AUFK-OBJNR.
    DATA v_menge LIKE vbap-kwmeng.
      SELECT SINGLE OBJNR
        INTO V_OBJNR
        FROM AUFK
       WHERE AUFNR EQ AFPO-AUFNR.
      SELECT * FROM COSS
       WHERE OBJNR EQ V_OBJNR
         AND WRTTP IN ('01', '04'). " p_wrttp. "Labour Cost ( Plan, Actual)
        PERFORM GET_VALUES_FROM_COSS.
      ENDSELECT.
      SELECT * FROM COSP
       WHERE OBJNR EQ V_OBJNR
         AND WRTTP IN ('01', '04')         " p_wrttp
         AND KSTAR NE '0000510033'. " EQ p_kstar2.      "Material Cost
        PERFORM GET_VALUE_FROM_COSP.
      ENDSELECT.
    Get the unit cost of the production order by dividing the production
    cost by the order quantity. The result will be multiplied by the
    GL posting qunatity (Delivery quantity) to get the production cost
    for the quantity being deluivered.
      IF NOT AFPO-PSMNG IS INITIAL.
        OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_HOURS_ACT =
                          OUT_REC-ADDNL_LABOUR_HOURS_ACT / AFPO-PSMNG.
        OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_HOURS_PLN =
                         OUT_REC-ADDNL_LABOUR_HOURS_PLN / AFPO-PSMNG.
        OUT_REC-LABOUR_COST_ACT = OUT_REC-LABOUR_COST_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_COST_ACT =
                         OUT_REC-ADDNL_LABOUR_COST_ACT / AFPO-PSMNG.
        OUT_REC-LABOUR_COST_PLN = OUT_REC-LABOUR_COST_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_COST_PLN =
                         OUT_REC-ADDNL_LABOUR_COST_PLN / AFPO-PSMNG.
        OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_MATERIAL_COST_ACT =
                         OUT_REC-ADDNL_MATERIAL_COST_ACT / AFPO-PSMNG.
        OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_MATERIAL_COST_PLN =
                         OUT_REC-ADDNL_MATERIAL_COST_PLN / AFPO-PSMNG.
      ENDIF.
    Multiply the calculated Unit Production costs with the GL quantity to
    get the actual production cost of the quantity delivered.
    Calculation for Labour Hours
      OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT *
                                 OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_HOURS_ACT = OUT_REC-ADDNL_LABOUR_HOURS_ACT *
                                 OUT_REC-QUANTITY.
      OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN *
                                 OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_HOURS_PLN = OUT_REC-ADDNL_LABOUR_HOURS_PLN *
                                 OUT_REC-QUANTITY.
    Calculation for Material Cost
      OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_MATERIAL_COST_ACT =
          OUT_REC-ADDNL_MATERIAL_COST_ACT * OUT_REC-QUANTITY.
      OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_MATERIAL_COST_PLN =
          OUT_REC-ADDNL_MATERIAL_COST_PLN * OUT_REC-QUANTITY.
    Calculation for Labour cost
      OUT_REC-LABOUR_COST_ACT   = OUT_REC-LABOUR_COST_ACT *
                                   OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_COST_ACT = OUT_REC-ADDNL_LABOUR_COST_ACT *
                                  OUT_REC-QUANTITY.
      OUT_REC-LABOUR_COST_PLN   = OUT_REC-LABOUR_COST_PLN *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_COST_PLN = OUT_REC-ADDNL_LABOUR_COST_PLN *
                                  OUT_REC-QUANTITY.
    Get the planned material cost from the total of the planned cost of
    the component materials in the production order confirmations.
      SELECT BWART MENGE MATNR SHKZG FROM AUFM
        INTO (AUFM-BWART, AUFM-MENGE, AUFM-MATNR, AUFM-SHKZG)
       WHERE AUFNR EQ AFPO-AUFNR.
        CHECK AUFM-BWART NE '101'.
        READ TABLE I_MBEW WITH KEY MATNR = AUFM-MATNR
                                   BWKEY = AFPO-DWERK.
        IF SY-SUBRC NE 0.
          SELECT MATNR BWKEY ZPLPR LPLPR PEINH
            FROM MBEW
            INTO I_MBEW
           WHERE MATNR EQ AUFM-MATNR
             AND BWKEY EQ AFPO-DWERK.
            APPEND I_MBEW.
          ENDSELECT.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IF I_MBEW-ZPLPR NE 0.
            IF AUFM-SHKZG EQ 'H'.
              OUT_REC-PLANNED_MATERIAL_COST =
              OUT_REC-PLANNED_MATERIAL_COST +
                           ( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ELSE.
              OUT_REC-PLANNED_MATERIAL_COST =
              OUT_REC-PLANNED_MATERIAL_COST -
                           ( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ENDIF.
          ELSEIF I_MBEW-LPLPR NE 0.
            IF AUFM-SHKZG EQ 'H'.
              OUT_REC-CURRENT_MATERIAL_COST =
              OUT_REC-CURRENT_MATERIAL_COST +
                           ( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ELSE.
              OUT_REC-CURRENT_MATERIAL_COST =
              OUT_REC-CURRENT_MATERIAL_COST -
                           ( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDSELECT.
    Get the Future material cost per Unit by deviding the calculated
    Future material cost above with the goods reciept quantity to, then
    multiply the unit cost with the GL quantity to get the Future material
    Cost for the Quantity delivered. (Quantity in the entery from GLPCA
    Table).
      IF NOT AFPO-WEMNG IS INITIAL.
        OUT_REC-PLANNED_MATERIAL_COST =
           OUT_REC-PLANNED_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
        OUT_REC-CURRENT_MATERIAL_COST =
           OUT_REC-CURRENT_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
      ENDIF.
    ENDFORM.                               " GET_COSTS
    Form GET_VALUE_FROM_COSP                                             *
    Get the Material cost from COSP table.                               *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_VALUE_FROM_COSP.
      FIELD-SYMBOLS: <FS> TYPE ANY.
      DATA: V_COMPONENT TYPE I.
    Cummulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the aprtial posting of
    prodction order values in diffrent periods.
      V_COMPONENT = 15.
      DO 16 TIMES.
        ADD 1 TO V_COMPONENT.
        ASSIGN COMPONENT V_COMPONENT OF STRUCTURE COSP TO <FS>.
        IF COSP-WRTTP EQ '04' AND COSP-KSTAR EQ P_KSTAR2.
          ADD <FS> TO OUT_REC-MATERIAL_COST_ACT.
        ELSEIF COSP-WRTTP EQ '04'.
          ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_ACT.
        ELSEIF COSP-WRTTP EQ '01' AND COSP-KSTAR EQ P_KSTAR2.
          ADD <FS> TO OUT_REC-MATERIAL_COST_PLN.
        ELSEIF COSP-WRTTP EQ '01'.
          ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_PLN.
        ENDIF.
      ENDDO.
    ENDFORM.                               " GET_VALUE_FROM_COSP
    Form GET_VALUES_FROM_COSS                                            *
    Get the Labour cost and Labour hours from the COSS table.            *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_VALUES_FROM_COSS.
      FIELD-SYMBOLS: <FS1> TYPE ANY,
                     <FS2> TYPE ANY.
      DATA: V_COMPONENT1 TYPE I,
            V_COMPONENT2 TYPE I.
    Cummulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the aprtial posting of
    prodction order values in diffrent periods.
      V_COMPONENT1 = 15.
      V_COMPONENT2 = 111.
      DO 16 TIMES.
        ADD 1 TO: V_COMPONENT1, V_COMPONENT2.
        ASSIGN COMPONENT V_COMPONENT1 OF STRUCTURE COSS TO <FS1>.
        ASSIGN COMPONENT V_COMPONENT2 OF STRUCTURE COSS TO <FS2>.
        IF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ P_KSTAR1.
          ADD <FS1> TO OUT_REC-LABOUR_COST_ACT.
          ADD <FS2> TO OUT_REC-LABOUR_HOURS_ACT.
        ELSEIF COSS-WRTTP EQ '04'.
          ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_ACT.
          ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_ACT.
        ELSEIF COSS-WRTTP EQ '01' AND COSS-KSTAR EQ P_KSTAR1.
          ADD <FS1> TO OUT_REC-LABOUR_COST_PLN.
          ADD <FS2> TO OUT_REC-LABOUR_HOURS_PLN.
        ELSEIF COSS-WRTTP EQ '01'.
          ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_PLN.
          ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_PLN.
        ENDIF.
      ENDDO.
    ENDFORM.                               " GET_VALUES_FROM_COSS

Maybe you are looking for