Multiple line items one with default values

Hi All
We have a flat file coming into xi that needs to be mapped to an idoc, the idoc will have multiple line items.
The first line item must have default values but the from the second line item and on must have dynamic value from file? How Can this be achieved?
Regards

Hi,
I didnt get the the exact prb you have been facing...
But from my understabding,
Try giving constants for the default values of first Line Item.
Then, directly map the file data to the second line items onwards..
Regards,
Swetha,

Similar Messages

  • Inserting Multiple Line Items To Stored Procedure

    Hi
    I need to insert line item values to one of the argument in stored procedure.what data type do i need to pass for type attribute.I tried with different datatypes from sap help but no luck.Please guide me how should i proceed.
    Interface is : Idoc to JDBC (stored procedure)
    Target structure:
                                     DT_Orderstatus_Trgt
                                         --> StatementName
                                                 -->SP Name
                                                        action--->Attribute
                                                        table--->Attribute
                                                         --->Argument (to insert multiple line items)
                                                                 isInput
                                                                 isOutput
                                                                 type
    Just i am showing only one argumnet which needs to be inserted multiple line items.
    Thanks

    Hi,
    Stored procedure can support the below data types
    INTEGER, BIT, TINYINT, SMALLINT, BIGINT, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL, CHAR, VARCHAR, STRING, LONGVARCHAR, DATE, TIME, TIMESTAMP, BINARY, VARBINARY, LONGVARBINARY, BLOB (input and output),CLOB (input and output), CURSOR (output; only in conjunction with the Oracle JDBC driver).
    But
    Instead of passing multiple line items / array of input value in stored procedure, You can go for the below option as having 2 statements in your mapping with below structures and those 2 statements should be linked with the primary key say col1.
    <root>
    <StatementName1>
    <dbTableName action=u201DINSERTu201D>
    <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2</col2>
    </access>
    <access>
    <col1>val11</col1>
    </access>
    </dbTableName>
    </StatementName1>
    <StatementName2>
    <dbTableName action=u201DINSERTu201D>
    <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2</col2>
    </access>
    <access>
    <col1>val11</col1>
    </access>
    </dbTableName>
    </StatementName2>
    </root>

  • BDC for multiple line items (VA01)

    Hi Experts,
      I create a BDC for VA01 transaction for single line item in that now i want to upload multiple line items also with  o/p of total no. of records uploaded, no. of records posted and the no. of error records...
    Can any body explain with sample code...

    Hi,
    if the flat file is containing header and item records...
    first split those records tooo two internal tables header and item..
    Loop at header ...
      process of recording steps for header....
    Loop at item...
    here create a varialbe with char 2 .. for index value....
      process of item recording steps..
      increment the index value by 1....
      here u have to pass  'p+'  OK_CODE..
    Endloop ..(item)
    Endloop...(header)
    for more info goo through this link...
    http://www.sap-img.com/bdc.htm
    hope helpful
    Raghunath.S

  • SRM 7 - defaulting values for multiple line items on shopping cart

    Hi,
    We are using SRM 7 - Employee self service - Punch out catalogues and describe requirements.
    Our scenario is this:
    - User is responsible for creating shopping carts for numerous cost centres/other users
    - Shopping cart will have multiple line items (but the cost centre/other user will be same for all line items)
    - Is it possible to define in a shopping cart that all line items will have a specific value?  E.g. all line items will be assigned to a specific cost centre?
    I know about assigning dedault values in PPOMA_BBP - but our situation is where user does not want to use this default value this time, but another value
    Any suggestions?
    Thanks

    Thanks Alex for quick reply
    To confirm, did you use the BBP_DOC_CHECK_BADI (in conjunction with the BBP_ITEM_CHECK_BADI) to look at different cost centres on the multiple lines on the shopping cart?
    Also - did you use the same BADI to give user opportunity to enter a default cost centre that is then automatically applied to all line items on the cart?
    Thanks
    Azam

  • Create ecatt script for one sales order creation with multiple line items

    Hi ,
    I want to create a ecatt script for one sales order creation with multiple line items. Preferably SAP GUI.
    This selection of data will be from an external file/ variants which will have only one row of data in it.
    Firstly: I have to sort the external file having same PO Numbers in an order.Group them together.
    Second: I have to create sales order for those many line items having same PO Number.
    Best Regard
    Taranum

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

  • Production order from sales order with multiple line item(for one material)

    Dear Gurus,
    I am working in MTO scenarios. If there is several line item in a sales order for one material, multiple production order( same as no. of sales order line item) is getting created against each of the line item.My requirement is,since the material code is same in each line item and sales order is one, one production order should be generated for all line item. please tell me how to do it.
    (Here for one material, multiple line item is required for some specific reason)
    Regards
    Rajib Pathak

    Hi,
    This is not possible.
    In Std SAP will create one production order for one sales order. The stock is also allocated to thet particular sales order only. Because each and every sales order may vary in any one of the parameters. Considering this, SAP has designed like this.
    Regards,
    V. Suresh

  • Setting the value of a single attribute for multiple line items

    Hi all,
    I am working on a Web Dynpro application, I have created this applicaion for an accounting document so it has header data and multiple line item data. As per the requirement I have to put the following logic:
    1. When a user enters a value in the field KBLNR on the line item, all the other fields like cost centerm fund, functional area should populate from a database table based on the value of the KBLNR. to get this I have put the following code:
    TYPES: BEGIN OF t_kblp,
              fipos     TYPE kblp-fipos,
              kostl     TYPE kostl,
                      END OF t_kblp.
      DATA lv_kblnr TYPE wd_this->element_t_bseg-kblnr.
      DATA: lt_kblp TYPE STANDARD TABLE OF t_kblp,
            wa_kblp LIKE LINE OF lt_kblp,
            lt_bseg              TYPE STANDARD TABLE OF bseg,
            wa_bseg              TYPE bseg.
      DATA lo_nd_t_bseg TYPE REF TO if_wd_context_node.
      DATA lo_el_t_bseg TYPE REF TO if_wd_context_element.
      DATA: ls_t_bseg TYPE wd_this->element_t_bseg,
            lo_api_controller    TYPE REF TO if_wd_controller,
            lo_message_manager   TYPE REF TO if_wd_message_manager,
            lo_nd_tbseg          TYPE REF TO if_wd_context_node,
             lo_el_tbseg          TYPE REF TO if_wd_context_element,
             lt_el_tbseg          TYPE wdr_context_element_set,
             lv_bseg              TYPE bseg.
      lo_nd_t_bseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager.
      lo_nd_tbseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
      lt_el_tbseg = lo_nd_tbseg->get_elements( ).
      LOOP AT lt_el_tbseg INTO lo_el_tbseg.
        lo_el_tbseg->get_static_attributes(
                               IMPORTING static_attributes = lv_bseg ).
      IF lv_bseg-kblnr NE ' '.
          SELECT belnr
                 fipos
                 kostl
                 PSPNR
                 geber
                 saknr
                 fkber
                 grant_nbr
                 gsber
                 FROM kblp
                 inTO corresponding fields of wa_kblp
                 WHERE belnr = lv_bseg-kblnr and
                      saknr = lv_bseg-saknr.
            ENDSELECT.
    lo_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
    * get element via lead selection
            lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
    lo_el_tbseg->set_static_attributes(
                               EXPORTING static_attributes = wa_kblp ).
       CLEAR: lv_bseg, wa_kblp.
      ENDLOOP.
    everything is working fine but now the problem is couple of fields that I have in wa_kblp are with different names in bseg table and hence they are not updating... I tried putting the following logic within the loop :
    lo_el_t_bseg->set_attribute(
        name =  `PROJK`
    value = wa_kblp-pspnr ).
    but it's only setting the value of the first line item and not working for the multiple line items, can you please tell me how can do this?
    Thanks,
    Rajat Garg
    Edited by: rajatg on Jun 24, 2011 5:09 PM

    Hi Chris,
    I tried your code and it worked fine but after I put this code I am getting another issue. within the loop I had a code to make the fields non modifiable on the screen and was working fine but now what's happening is it's making the all the lines uneditable except the one with data on it (which is completely opposite), this is what I have coded:
    LOOP AT lt_el_tbseg INTO lo_el_tbseg.
        lo_el_tbseg->get_static_attributes(
                               IMPORTING static_attributes = lv_bseg ).
    IF lv_bseg-kblnr NE ' '.
      SELECT belnr
                 fipos
                 kostl
                 PSPNR
                 geber
                 saknr
                 fkber
                 grant_nbr
                 gsber
                 FROM kblp
                 inTO corresponding fields of wa_kblp
                 WHERE belnr = lv_bseg-kblnr and
                      saknr = lv_bseg-saknr.
            ENDSELECT.
    move: wa_kblp-belnr to wa_bseg-kblnr,
    wa_kblp-fipos to wa_bseg-fipos,
    wa_kblp-kostl to wa_bseg-kostl,
    wa_kblp-pspnr to wa_bseg-projk,
    wa_kblp-geber to wa_bseg-geber,
    wa_kblp-saknr to wa_bseg-saknr,
    wa_kblp-fkber to wa_bseg-fkber,
    wa_kblp-grant_nbr to wa_bseg-grant_nbr,
    wa_kblp-gsber to wa_bseg-gsber,
    lv_bseg-dmbtr to wa_bseg-dmbtr.
    append wa_bseg to lt_bseg.
    lo_nd_edit_property = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG.EDIT_PROPERTY` ).
          get element via lead selection
          lo_el_edit_property = lo_nd_edit_property->get_element( ).
          lo_el_edit_property->set_attribute(
            name =  `EDIT_FIELD`
            value = 'ABAP_TRUE' ).
          lo_el_edit_property->set_attribute(
            name =  `EDIT_WBS`
            value = 'ABAP_TRUE' ).
    endif.
    endloop.
    o_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
    get element via lead selection
            lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
      CALL METHOD lo_nd_t_bseg->bind_table
        EXPORTING
          new_items            = lt_bseg.
    Can you please see what I am doing it wrong here....

  • Partial goods receipt for PO with multiple line items

    Hello All,
    While doing MIGO, for a PO with multiple line items, if one line item is having error, will we be able to go ahead with goods receipt? Or entire material document is blocked for doing MIGO?
    We will be doing a development - in case if there is problem in goods receipt (checking of any parameter, and if it is missing - we will be posting error message)...is it possible to ahead with next line item and still post the material document?
    If partial goods receipt if possible for PO with multiple line items, how do we do it?
    Regards,
    RJS

    Hi
    While doing MIGO, for a PO with multiple line items, if one line item is having error, will we be able to go ahead with goods receipt? Or entire material document is blocked for doing MIGO?
    No. You cannot post the MIGO, if even one of the PO line item is having problem or giving error.
    We will be doing a development - in case if there is problem in goods receipt (checking of any parameter, and if it is missing - we will be posting error message)...is it possible to ahead with next line item and still post the material document?
    If you skip a line irem and do GR with next line item, how will you match quantity & value with the vendor Invoice at LIV ?
    If partial goods receipt if possible for PO with multiple line items, how do we do it?
    Partial goods receipt is possible for PO line items. That means, if PO has 100 qty for line item 1 then you can do GR for 50 now and 50 later depending on the vendors delivery.
    Hope this is what you mean by "Partial Goods Receipt".
    Edited by: Arun R on May 10, 2010 2:03 PM

  • Certificate of Origin with multiple line items in sapscript - Urgent Please

    Hi Everyone,
    Can you please help me with this issue in SAPSCRIPT.
    This is for billing document with multiple items with each line item with different country of origin.Right now the form is printing only one country of origin even if it has 3 line items each with different country.It's getting first line item's country and printing......but it should diplay each country with comma separated... But in debug it is showing all 3 different countries but in print it is printing only first country of origin.
       I have given text element as &VBDKR-TEXT& in form.
    In ABAP program I am getting country of origin like this,
    CLEAR : V_T005,VBRP , MARC  .
      LOOP AT TVBDPR.
      SELECT SINGLE * FROM VBRP
        WHERE VBELN = VBDKR-VBELN AND POSNR = TVBDPR-POSNR .
    begin of addiiton for ppr 13661
      CLEAR MCH1.
    SELECT SINGLE HERKL FROM MCH1 INTO MCH1-HERKL WHERE MATNR = VBRP-MATNR
                                           AND CHARG = VBdpR-CHARG.
      IF MCH1-HERKL NE ' '.
        CLEAR MARC-HERKL.
        MARC-HERKL = MCH1-HERKL.
      ELSE.
        NAME = VBDKR-VBELN.
          PERFORM HEADER_TEXT1 USING 'VBBK' 'Z065' NAME SY-LANGU.
        IF SY-SUBRC EQ 0.
          READ TABLE TEXT_LINES INDEX 1 .
          IF SY-SUBRC EQ 0.
            VBDKR-TEXT = TEXT_LINES-TDLINE.
          ENDIF.
        ELSE.
          SELECT SINGLE * FROM MARC WHERE MATNR = VBRP-MATNR
                                    AND   WERKS = VBRP-WERKS.
        ENDIF.                                                  "ppr 13661
      ENDIF.                               "PPR 13661 ADD
      CLEAR *T005T.
    data:SEP(3) VALUE ' , '.
    DATA: BEGIN OF ITAB OCCURS 100,
           LANDX LIKE VBDKR-TEXT,
          END OF ITAB.
    clear ITAB.
      SELECT  LANDX FROM T005T INTO table itab WHERE SPRAS = SY-LANGU  AND
    LAND1 = MARC-HERKL.
    LOOP AT itab.
    VBDKR-TEXT = ITAB-LANDX.
    *MOVE VBDKR-TEXT TO ZLAND.
    AT NEW LANDX.
       concatenate ITAB-LANDX sep into VBDKR-TEXT.
    ENDAT.
    modify ITAB.
    VBDKR-TEXT = ITAB-LANDX.
    ENDLOOP.
    endloop.
    Thanks in advance.

    Hi
    It depends on the size of the main in the page, you can set the high of main in order to print max a certain number of rows (so items).
    In this way you don't need the abap control, but the system automatically will print the first page with 15 row and the next with 25

  • Unable to create PO with multiple line items through LSMW-BAPI method

    Hi All,
    I have a requirement of creating PO through LSMW. I can't use LSMW standard batch input program since there are some fileds not available and also it has many limitations. I'm using LSMW-BAPI method ( Business object BUS2012) which create IDOC and uses BAPI_PO_CREATE1 to ultimately post the PO in the system. I am trying to create PO from a single file which contains both Header and Item data.
    Now my problem is that everytime PO is being created with Single line item only. Everytime I am giving multiple item data in the source file LSMW is preparing multiple IDOCs for multiple line items. As per my understanding this is happenng since header and item is in the same hierarchy level of IDOC type PORDCR102 and the control record is inserted for every line item in the source file.
    It seems that through LSMW-BAPI  it is not possible to create PO with multiple line items. Can anybody provide some input regarding this? Thanks in advance.
    BR,
    Atanu Mukherjee

    Solved by myself.
    Earlier the problem was that LSMW was not being able to recognize items under same header. It was creating new IDOCs every time it gets a new item. To enable this we need to create two structure HEADERDATA and ITEMDATA.  Two additional identifier fields with identifier value 'H' and 'I' should be added in these two structures respectively. Then we need one sequential file with the identifiers field followed by the header and Item data. Example:
    H~header data
    I~item data
    I~item data 
    This would help the standard program to understand what are the items under same header and ultimately create PO with multiple line items.
    BR,
    Atanu Mukherjee

  • LSMW program to upload the sales order with multiple line items.

    Dear SD and PP Gurus,
    I am new to creating LSMW Program.
    I want to create a LSMW program to upload the sales order with multiple line items. I have read on SDN that it can be done on two phases. First Create Header Data than line items. IS IT TRUE??, Or
    Is there any procedure by which we can load the sales orders with multiple line items in a single run (part).
    I want to use Batch process, not a BAPI or IDOC procedure.
    I have created a program with
    object 0090
    Method 0000
    Program Name RVINVB10
    Program Type D
    Source Structure 1 - For Header and Source Structure 2  for Line Items.
    Mapped Field INDET (With Fix Value 1), ORDERTYPE, SALESORG, DISTCHANNEL, DIVISION, CUSTOMER, PONUMBER , DELVDATE, PRCGDATE, PMTTERM
    INCOT1 INCOT2 with Source Structure - 1 and
    Field INDENT (With Fix Value 2),  ITEMNO, MATCODE, MATQTY, SUOM, PLANT, BATCH, AMOUNT with Structure-2
    than maintained Structure relation ship, field Mapping, Specified Files, Assigned files, Read Data and other process,
    At final stage (Start Direct Input program RVINVB10) it is giving a message - Table name not allowed.
    Please tell me where I am wrong.
    Thanks in advance.
    DSC

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • How to make plant default on the line item along with the item category

    Hi All,
    I want to default Plant on the line item along with the item category.In order to meet the following scnario.
    1. I have two plants,first plant is maintained for the valuated item and the second plant is maintained for the non valuated item (Free Goods).
    Whenever user is entering an item in the sales order for which corresponding free goods item is maintained in the master record.System is proposing two lines items in the sales order.
    First line item is the main item which appears along with the Plant 1 which contains valuated items
    Second line item is for the Free of charge item which is being proposed from Plant 2, which contains the non valuated items.
    I want that the system should always propose Plant 1 with main item and Plant 2 with the Free of Charge item by default. (Along with the item category TAN and TANN)
    Rahul

    Delivering Plant is determined in the following order
    1. Customer material info record.
    2. Customer master
    3. Material master.
    Use one of them an default your plant.
    I think in your case you can use the materila master which will give an item level plant different. The other two will default the plant at the header level.
    regards
    jude

  • Multiple Line Items in One Service Entry Sheet

    Dear All,
    Can we capture multiple line Items of same PO in one Service Entry Sheet
    If yes,Please can you give some steps to do the same.
    Regards
    Murali raju

    Hello,
    We need to create a service entry sheet seperately for every line items of the PO.But you can create Service entry sheets for multiple lines with in that Line item.
    Ex. if u have 2 line item in the PO,
    Every line item of the PO will have Multiple services in the Item details..So these Multiple service number Entries shall be treated in the same Service Entry sheet. But not the 2 nd Line itme ot the Purchase order as it will have another set of Service entries.
    Please cme back if u hv queries..
    Mug

  • Where/ how do I set SNP to create Planned orders with multiple line items?

    Hi
    Currently our SNP is generating planned orders on a daily basis, it creates a single order with a single line item per location.
    Where/ how do set SNP to create planned orders on a daily basis to generate a single order with multiple line items per location, so therefore one planned order with multiple line items for a single location.
    Thanx
    Keegan

    Hi Keegan,
                   In SNP (APO) it is not possible to create order with multiple line items.
    But you can do some settings so that while planning system can do aggregation and disaggregation.
    But your requirment should be set on Aggregation/Dis-aggregation logic.
    Please follow the follwing links:
    http://help.sap.com/saphelp_scm2007/helpdata/en/2c/c557e9e330cc46b8e440fb3999ca51/content.htm
    Aggregation:
    http://help.sap.com/saphelp_scm2007/helpdata/en/42/f731d078e73ee4e10000000a1553f6/content.htm
    Disaggregation:
    http://help.sap.com/saphelp_scm2007/helpdata/en/a6/ebefaf32e22e468355da304cc59387/content.htm
    Please be sure that the setting of this logic will be at planning area level.
    You can't change aggregation/disaggregation logic further.
    Regards,
    Santosh

  • BAPI_GOODSMVT_CREATE with multiple line items

    Hi  All,
              I'm trying to create a GR document for PO with multiple items.
    I'm creating this GR with BAPI_GOODSMVT_CREATE and passing multiple line items to this bapi. It generates one GR document but it does not process one of the line item in PO.
    Any help would be appreciated.
    Thanks & Regards,
    Prasad

    Hi Vinod,
            Actually there are two line items in the PO and manually when I try to create a GR for both line items,  it creates a GR but when I pass it thr' BAPI, it is generating a GR only for one Line item.
    Thanks,
    Prasad

Maybe you are looking for

  • IMovie -- VHS

    Relevant hardware: iMac G5 OS 10.4.2, Hollywood Analog/Digital convertor, Sony VCR Relevant Software: iMovie HD 5.0.2 Issue: When converting digital to analog, video quality is poor, shaky and without color Explanation: I imported VHS -> iMovie (than

  • Materialized Views and Substr ?

    Hi, I'm currently trying to create a materialized view that can be fast refreshed, but it complains each time. I think it's because I'm using a constraint substr(x,1,10) so complete refreshes are all that can be done? My steps are : create materializ

  • Ecommerce site - how do I create several product pages using only one table of data?

    Hi Im designing an ecommerce clothing site for my assignment using an access database. When I create the Data Set it takes all the information from my Acess table "Products" , creating one huge list of products on a single web page. However, i would

  • Function module to get last fiscal week

    Hi Gurus, Can anybody give me the function module to go back to few fiscal weeks. For example , if the current fiscal week is 2008030, I need to get the value 2008024. This can be done with ABAP code. But I am looking for function module. Thanks, Raj

  • Recordset on html document type

    Is it possible to add a Recordset on html page? I know I could convert the document to an ASP page to mke this possible, but I was wondering if it is possible to do this with converting. Cheers.