Handling dynamic item data in VSTS

Hi Team,
Can you please let us know how to handle dynamic item data in VSTS.
Regards
Raghavendra
8105577088

Hi Raghavendra,
Based on your previous threads posted by you in the test forum, I doubt that you want to create the coded UI test, am I right?
If so, which kind of app did you want to test, WPF or others? Could you share us a screen shot about the real UI controls you want to test? What real Controls you want to test, list item controls or others?
You know that to find a control in coded UI test, we have to use the unique peoperties as the search properties, so if your controls are dynamic, the real issue would be related to the search properties you use in your code.
Like this case:
https://social.msdn.microsoft.com/Forums/en-US/4c4805f0-230d-459d-a3e5-61e62746c5b9/list-box-item-is-not-get-selected-while-play-back-the-recorded-script-in-coded-ui-test?forum=vsautotest
As Pankaj's suggestion, if the list items are dynamic then you can use the index values instead of the innertext, so the real issue would be related to how to use the search perperties in your side. If you item text value is dynamic, you'd better not
use the text value as the search properties. 
About "How does “Coded UI test” finds a control ??", reference:
http://blogs.msdn.com/b/balagans/archive/2009/12/28/9941582.aspx
If I have misunderstood this issue, please feel free to let me know.
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How to dynamically replace variables in SMARTFORM texts based on item data?

    Hi experts,
    I'm currently designing a confirmation of order using Adobe PDF forms. The general layout with tables, pictures and texts was not big deal.
    But one tiny bit doesn't work and I'm becoming more and more desperate about it.
    We need various free texts for our pdf form. I created the texts using smartform texts. Some of these texts need to be slightly dynamic, so I added some dynamic fields in it.
    For example:
         "The material is currently out of stock.You can expect shipping around week &num_week&."
    To replace the dynamic field &num_week& in my interface, I read that I have to name the dynamic field exactly like the corresponding field in my interface. In my case this would be now:
         "The material is currently out of stock.You can expect shipping around week &SLS_PRT_COM-ITEM_DETAIL-ZZ_EXTRAFIELDS-ZZWEEKNUM&."
    To see the text on my form, I added a text object with type 'text module' and the proper textname. Of course I'm able to insert text on my form, save and activate it without problems. But if I want to print the form, nothing happens as the print program exits with an error code.
    After some hours I found out that this problem only occurs if I'm trying to replace the dynamic field with a field from the item table. Using a field from head details or globals like sy-mandt works like a charm.
    So my question is: Is it possible to use item data to replace dynamic fields of a smartform text?
    Greetings and thanks in advance!
    André

    Hi
    Have a look at the links below:
    LiveCycle ES2 * Adobe LiveCycle Designer ES2
    Using floating field in Adobe Forms to display text paragraph with dynamic variables in between
    After adding the floating field it will apeare in the hierarchy pallet above or bellow the text field.
    Good luck
    Shai.

  • In  BDC how you handled header data and item data

    In  BDC how you handled header data and item data

    Raja,
    Can you be more clear ?
    Usually you load the header data one and then loop at the item data and then load the item data.
    This example should help you.
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • How to dynamic set messageInputText item data type?

    Hi,
    I have a LOV and other messageInputText items on the page. I need to be able to change the messageInputText item data type based on the value selected from LOV. How can I do that?
    DD

    1)Allow PPR on the item that receives the LOV values
    2)Edit the VO query and create a SQL based column, which in turn will control the switcher. Something like –
    decode(nvl(to_char(EmployeeEO.END_DATE), 'N'), 'N', 'DataType1', 'DataType2') AS DELETE_SWITCHER
    3)Now add a switcher region with two cases in your page. Each case should represent the two possible values defined in the SQL based column ( “DataType1”, DataType2” in the above example).
    4)Add two messageTextInput items under each case, but with different datatypes.

  • Check marks or dynamic items for run-time shortcut menus

    Labview version: 8.0
    I'd like to create a run-time shortcut menu for my Xcontrol, that would
    allow user to toggle between two states of the control. Is it possible
    to either
    1) dynamically apply check marks to run-time shortcut menus or
    2) dynamically modify the run-time shortcut menu content
    Tomi
    Tomi Maila

    Hi Tomi,
    Great question.  Yes, you can do what you want with run-time shortcut menus in LabVIEW 8.0.  If you want to dynamically modify the menu content, you have to do it in the "Shortcut Menu Activation?" event in the facade VI of the XControl.  In the event data for this event is a parameter called "MenuRef" which works with the same menu primitives that have been around since LabVIEW 5 for editing the menu bar at run-time. 
    With these primitives, you can add/delete/modify menu items to the shortcut menu.  The items that are already in the MenuRef when this event case executes are always the ones that are statically defined, either by LabVIEW or by customizing them.  You do not have control over the state of the items that LabVIEW adds, but you can remove them and add ones with the same text (just with a different tag).  In your case, you would probably want to use the Insert Menu Item primitive to add an item such as "Toggle State".  Give it a tag such as "USER_TOGGLE_STATE".  Then you'll want to use the Set Menu Item Info primitive to set the checkmark for that item based on the state of the XControl.
    Then, you'll need to add an event case for the "Shortcut Menu Selection (User)" event so you can handle the item being selected.  Wire the Item Tag parameter from the event data to a case structure and add a case to look for "USER_TOGGLE_STATE".  And in that case, toggle the state of your XControl.  That's all you need to do!
    The Dual Mode Thermomter shipping example in <LabVIEW 8.0>\examples\general\xcontrols\Dual Mode Thermometer\Simple Dual Mode Thermometer XControl.lvproj is a simple example of how you can modify the menu and respond to the items selected.  It's a little different than what you want to do, but it might help you to look at it.
    Good luck!  Let me know if you have questions.
    Robbie

  • Line item data is not saving while creating a Sales order using Interactive

    Hi all,
    I am creating a sales order Using Interactive forms. In the form i am having Header data and line item data.I had created two structures one for Header data and one for Line item data. For entering  the LINE ITEM DATA i had created a Dynamic table with Buttons ADD ROW and DELETE ROW.
    User will Add the Row or Delete the Row based on the requirement.
    My issue is When ever the user clicks the SUBMIT button after entering the header data and 3 line items data , Sales order has been created with only first line item and the remaining two line items are not created.
    My Interactive form is like below
    HEADER DATA
    DOC_TYPE
    SALES_ORG
    DIST_CHN
    DIVISION
    PURCH_NO
    PARTN_ROLE
    PART_NO
    LINE ITEM DATA
                             ITEM_NO      MATERIAL          PLANT          QTY        COND_TYPE            COND_VALUE
    ADD ROW
    DELETE ROW
                                                                                    SUBMIT
    My  code for the method ONACTIONCLICK is like below
    method ONACTIONCLICK .
    data:
          Node_Adobe       type ref to If_Wd_Context_Node,
          Node_Zsaleheader       type ref to If_Wd_Context_Node,
          Elem_Zsaleheader       type ref to If_Wd_Context_Element,
          Stru_Zsaleheader       type If_Main=>Element_Zsaleheader,
          Node_Zsaleitem       type ref to If_Wd_Context_Node,
          Elem_Zsaleitem       type ref to If_Wd_Context_Element,
          Stru_Zsaleitem       type If_Main=>Element_Zsaleitem.
      data: header_data type BAPISDHEAD.
      data: item_wa type BAPIITEMIN.
      data: item_data type table of BAPIITEMIN.
      data: partner_wa type BAPIPARTNR.
      data: partner_data type table of BAPIPARTNR.
      data: sales_order type BAPIVBELN-VBELN.
      data: Errorlog type BAPIRETURN1.
    navigate from <CONTEXT> to <ADOBE> via lead selection
      Node_Adobe = wd_Context->get_Child_Node( Name = IF_MAIN=>wdctx_Adobe ).
    navigate from <ADOBE> to <Zsaleheader> via lead selection
      Node_Zsaleheader = Node_Adobe->get_Child_Node( Name = IF_MAIN=>wdctx_Zsaleheader ).
      Node_Zsaleitem = Node_Adobe->get_Child_Node( Name = IF_MAIN=>wdctx_Zsaleitem ).
    get element via lead selection
      Elem_Zsaleheader = Node_Zsaleheader->get_Element(  ).
      Elem_Zsaleitem = Node_Zsaleitem->get_Element(  ).
    get all declared attributes
      Elem_Zsaleheader->get_Static_Attributes(
        importing
          Static_Attributes = Stru_Zsaleheader ).
      header_data-DOC_TYPE = Stru_Zsaleheader-DOC_TYPE.
      header_data-SALES_ORG = Stru_Zsaleheader-SALES_ORG.
      header_data-DISTR_CHAN   = Stru_Zsaleheader-DISTR_CHAN.
      header_data-DIVISION = Stru_Zsaleheader-DIVISION.
      header_data-PURCH_NO = Stru_Zsaleheader-PURCH_NO.
      partner_wa-PARTN_ROLE   = Stru_Zsaleheader-PARTN_ROLE.
      partner_wa-PARTN_NUMB = Stru_Zsaleheader-PARTN_NUMB.
       append partner_wa to partner_data.
        Elem_Zsaleitem->get_Static_Attributes(
        importing
          Static_Attributes = Stru_Zsaleitem ).
      item_wa-ITM_NUMBER = Stru_Zsaleitem-ITM_NUMBER.
      item_wa-MATERIAL   = Stru_Zsaleitem-MATERIAL.
      item_wa-PLANT = Stru_Zsaleitem-PLANT.
      item_wa-REQ_QTY = Stru_Zsaleitem-REQ_QTY.
      item_wa-COND_TYPE   = Stru_Zsaleitem-COND_TYPE.
      item_wa-COND_VALUE = Stru_Zsaleitem-COND_VALUE.
      append item_wa to item_data.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
      EXPORTING
        ORDER_HEADER_IN           = header_data
      WITHOUT_COMMIT            = ' '
      CONVERT_PARVW_AUART       = ' '
    IMPORTING
       SALESDOCUMENT             = sales_order
      SOLD_TO_PARTY             =
      SHIP_TO_PARTY             =
      BILLING_PARTY             =
       RETURN                    = errorlog
      TABLES
        ORDER_ITEMS_IN            = item_data
        ORDER_PARTNERS            = partner_data
      ORDER_ITEMS_OUT           =
      ORDER_CFGS_REF            =
      ORDER_CFGS_INST           =
      ORDER_CFGS_PART_OF        =
      ORDER_CFGS_VALUE          =
      ORDER_CCARD               =
      ORDER_CFGS_BLOB           =
      ORDER_SCHEDULE_EX         =
    endmethod.
    PLEASE SUGGEST ME IF ANY CODE CHANGE IS REQUIRED
    Thanks in advance
    Ajay

    Hi,
    The item data is not read because, the dynamically added rows should also reflect back to the Web Dynpro context. When the user clicks on Add Row, use the Onsubmit event to add a empty line to internal table and then bind it to the context. And if the user removes a row, remove a row from internal table and bind it back to the context.
    You may refer this article.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/802f0ed1-a17a-2c10-7db4-d515a5b047ed
    Regards,
    Runal

  • Question on Dynamic Query Data Source and Form Folders in Oracle Forms 6i

    Hi there -
    I have one interesting requirement in Oracle Forms.
    This is what I wanted to do.
    1. Have a LOV and Go button on Form.
    2. From LOV, I will select a pre-defined custom table and click Go.
    3. Based on the selected custom table, I have to populate the Block (Tabular Format).
    4. User should be able to do update, delete, insert on this block.
    5. User should be able to use the Oracle Form folders functionality (select only necessary column and save views etc. Std folder functionality).
    6. If user selects a different custom table name in the LOV on top, I need to refresh the data from the block based on this new table. Remaining functionality should be as it is (steps 3 to 5).
    You can see here, I am going to have dynamic query data source (Table Name as well as column mapping) on the block. I do not know before hand how many columns the user selected table has!
    This is what I have planned for this so far but I have some major questions before I can move on with this design:
    1. I am going to create a table structure with fixed number of column in form (40 cols assuming that the custom table will not have more that 40 cols). (Kind of limitation but it's okay as of now).
    2. Dynamically populate the block based on the table name selected by the user from LOV. Dynamically change the table column names based on the table selected etc.
    3. Perform insert, update, delete using PL/SQL package.
    So far it looks okay.
    Now my real question is,
    Can user still be able to user "Folders" functionality here? I have never done this kind of development before and I doubt the dynamic column naming, dynamic column data source will really work for "folders"!
    Also, I am not really sure whether user will be able to save these "folder" queries?
    Okay so form experts, can you ppl suggest me if this is really going to work? Are there any better ways to do this?
    Initially I tried to do this in OA Framework but I got stuck at because as per OAF developer guide "I cannot user OAF personalization for dynamic items, regions etc".
    For more info on that thread see this link...
    Re: setUserCustomizable issue!
    Thanks in advance for the help.

    Any suggestion anyone?

  • Problem in item data updation in Opportunity Creation

    Hi All,
    I am able to create the opportunity with BAPI_OPPORTUNITY_CREATEMULTI but the item data ( product tab in the opportunity ) is blank.
    Please see the code below which i am using for this item data population. Update is getting terminated if i am using header handle. Please send me the correct solution for this problem.
    *set item data
      clear ls_input_field.
      ls_input_field-ref_handle  = lc_handle_2.
    ls_input_field-ref_kind    = 'B'.
      ls_input_field-objectname  = 'ORDERADM_I'.
      ls_input_field-fieldname   = 'HANDLE'.
      INSERT ls_input_field INTO TABLE lt_input_field.
      ls_input_field-fieldname   = 'HEADER_HANDLE'.
      INSERT ls_input_field INTO TABLE lt_input_field.
    ls_input_field-fieldname     = 'LOGICAL_KEY'.
    INSERT ls_input_field INTO TABLE lt_input_field.
      ls_input_field-fieldname   = 'ORDERED_PROD'.
      INSERT ls_input_field INTO TABLE lt_input_field.
      ls_input_field-fieldname   = 'NUMBER_INT'.
      INSERT ls_input_field INTO TABLE lt_input_field.
      ls_input_field-fieldname   = 'MODE'.
      INSERT ls_input_field INTO TABLE lt_input_field.
      lv_item = 0.
      lv_number_int = 0.
      ls_item-handle               = lc_handle_2.
      ls_item-header_handle        = lc_handle_1.
    ls_item-parent_handle        = lc_handle_1.
      if i_form_id = 'CAP'.
        ls_item-ordered_prod       = 'CAP_FEE'.
        ls_item-number_int = lv_number_int + 10.
        ls_item-mode               = 'A'.
        append ls_item to lt_item.
        lv_number_int = ls_item-number_int.
        clear ls_item.
    *set schedule line
      clear ls_input_field.
      ls_input_field-ref_handle  = lc_handle_2.
      ls_input_field-objectname  = 'SCHEDLIN'.
      ls_input_field-ref_kind    = 'B'.
      ls_input_field-fieldname     = 'ITEM_HANDLE'.
      INSERT ls_input_field INTO TABLE lt_input_field.
      ls_input_field-fieldname     = 'HANDLE'.
      INSERT ls_input_field INTO TABLE lt_input_field.
      ls_input_field-fieldname     = 'QUANTITY'.
      INSERT ls_input_field INTO TABLE lt_input_field.
      ls_scheduleline-item_handle = lc_handle_2.
      ls_scheduleline-handle      = lc_handle_1.
      ls_scheduleline-quantity    = 1.
      append ls_scheduleline to lt_scheduleline.
      endif.
    - Prakash

    Hi,
    Use the below code to maintain line items, in FM 'CRM_ORDER_MAINTAIN'.
              CREATION OF THE ITEM GUID
                CLEAR v_item_ref_guid.
                CALL FUNCTION 'GUID_CREATE'
                  IMPORTING
                    ev_guid_16 = v_item_ref_guid.
              CREATION OF SCHEDULING LOGICAL GUID.
                CLEAR v_sched_logical.
                CALL FUNCTION 'GUID_CREATE'
                  IMPORTING
                    ev_guid_16 = v_sched_logical.
              values for it_pricing
                CLEAR wa_pricing.
                CLEAR it_pricing.
                wa_pricing-ref_handle = c_ref_handle2.
                wa_pricing-ref_guid   = v_item_ref_guid.
                wa_pricing-ref_kind   = c_b_kind.
                INSERT wa_pricing INTO TABLE it_pricing.
              values for product_i-UOM
                  CLEAR wa_product.
                  CLEAR wa_fieldname.
                  CLEAR it_fields.
                  wa_fieldname-fieldname = c_process_qty_unit_field.
                  INSERT  wa_fieldname INTO TABLE  it_fields.
                  CLEAR wa_input_field.
                  wa_input_field-ref_handle   = c_ref_handle2.
                  wa_input_field-ref_guid     = v_item_ref_guid.
                  wa_input_field-ref_kind     = c_b_kind.
                  wa_input_field-objectname   = c_product_i_input.
                  wa_input_field-field_names  = it_fields.
                  INSERT wa_input_field INTO TABLE it_input_field.
                  CLEAR wa_product_i.
                  wa_product_i-ref_guid         = v_item_ref_guid.
                  wa_product_i-ref_handle       = c_ref_handle2.
                  wa_product_i-process_qty_unit = wa_product-process_qty_unit.
                  INSERT  wa_product_i INTO TABLE it_product_i.
                ENDIF.
              values for service_i
                CLEAR wa_input_field.
                wa_input_field-ref_handle   = c_ref_handle2.
                wa_input_field-ref_guid     = v_item_ref_guid.
                wa_input_field-ref_kind     = c_b_kind.
                wa_input_field-objectname   = c_service_i.
                wa_input_field-field_names  = it_fields.
                INSERT wa_input_field INTO TABLE it_input_field.
                CLEAR wa_service_i.
                wa_service_i-ref_guid   = v_item_ref_guid.
                wa_service_i-ref_handle = c_ref_handle2.
                INSERT wa_service_i INTO TABLE it_service_i.
              fieldnames for quantity
                CLEAR wa_schedul.
                READ TABLE it_schedul INTO wa_schedul INDEX 1.
                IF sy-subrc = 0.
                  CLEAR wa_fieldname.
                  CLEAR it_fields.
                  wa_fieldname-fieldname = c_logical_key.
                  INSERT  wa_fieldname INTO TABLE  it_fields.
                  CLEAR wa_fieldname.
                  wa_fieldname-fieldname = c_quantity.
                  INSERT  wa_fieldname INTO TABLE  it_fields.
                  CLEAR wa_input_field.
                  wa_input_field-ref_handle   = c_ref_handle2.
                  wa_input_field-ref_guid     = v_item_ref_guid.
                  wa_input_field-ref_kind     = c_b_kind.
                  wa_input_field-objectname   = c_schedlin_input.
                  wa_input_field-logical_key  = c_log_key_item.
                  wa_input_field-field_names  = it_fields.
                  INSERT wa_input_field INTO TABLE it_input_field.
                  CLEAR wa_quantity.
                  CLEAR it_quantity.
                  wa_quantity-guid          = v_sched_logical.
                  wa_quantity-item_guid     = v_item_ref_guid.
                  wa_quantity-quantity      = wa_schedul-quantity.
                  wa_quantity-logical_key   = c_log_key_item.
                  wa_quantity-handle        = c_ref_handle0.
                  INSERT wa_quantity INTO TABLE it_quantity.
                valus for quantity
                  CLEAR wa_schedulin.
                  wa_schedulin-ref_guid   = v_item_ref_guid.
                  wa_schedulin-ref_handle = c_ref_handle2.
                  wa_schedulin-schedlines = it_quantity.
                  INSERT wa_schedulin INTO TABLE it_schedulin.
                ENDIF.
              fieldnames for product
                CLEAR wa_orderadm.
                READ TABLE it_orderadm INTO wa_orderadm INDEX 1.
                IF sy-subrc = 0.
                  CLEAR wa_fieldname.
                  CLEAR it_fields.
                  wa_fieldname-fieldname = c_itm_proc_ident.
                  INSERT  wa_fieldname INTO TABLE  it_fields.
                  CLEAR wa_fieldname.
                  wa_fieldname-fieldname = c_mode_input.
                  INSERT  wa_fieldname INTO TABLE  it_fields.
                  CLEAR wa_fieldname.
                  wa_fieldname-fieldname = c_ordered_prod.
                  INSERT  wa_fieldname INTO TABLE  it_fields.
                  CLEAR wa_fieldname.
                  wa_fieldname-fieldname = c_number_int.
                  INSERT  wa_fieldname INTO TABLE  it_fields.
                  CLEAR wa_fieldname.
                  wa_fieldname-fieldname = c_prog_id.
                  INSERT wa_fieldname INTO TABLE it_fields.
                  CLEAR wa_input_field.
                  wa_input_field-ref_handle   = c_ref_handle2.
                  wa_input_field-ref_guid     = v_item_ref_guid.
                  wa_input_field-objectname   = c_orderadm_i_input.
                  wa_input_field-field_names  = it_fields.
                  INSERT wa_input_field INTO TABLE it_input_field.
                values for product
                  CLEAR wa_orderprp_i.
                  CLEAR v_itemno.
                  v_itemno = v_itemno + v_line_incr.
                  wa_orderprp_i-guid          = v_item_ref_guid.
                  wa_orderprp_i-header        = v_head_ref_guid.
                  wa_orderprp_i-number_int    = v_itemno.
                  wa_orderprp_i-ordered_prod  = wa_orderadm-ordered_prod.
                  wa_orderprp_i-description   = wa_orderadm-description.
                  wa_orderprp_i-handle        = c_ref_handle2.
                  wa_orderprp_i-number_int    = wa_orderadm-number_int .
                  wa_orderprp_i-zzprogram_id  = wa_orderadm-zzprogram_id.
                  INSERT wa_orderprp_i INTO TABLE it_orderprp_i.
                ENDIF

  • Handling line items in bdc

    hi,please tell me how to handle the line items i.e the header data and item data in bdc?
    provide me a clear vision?

    go with this sample code
    REPORT zsowja NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA: bdcdat LIKE bdcdata OCCURS 0 WITH  HEADER LINE.
    DATA: BEGIN OF record OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EKORG
            ekorg(004),
    data element: BKGRP
            ekgrp(003),
    data element: EMATNR
            ematn(018),
    data element: BSTMG
            menge(017),
    data element: EWERK
            werks(004),
          END OF record.
    DATA : BEGIN OF head_itab OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EKORG
            ekorg(004),
    data element: BKGRP
            ekgrp(003),
       END OF head_itab.
    DATA : BEGIN OF item_itab OCCURS 0,
    data element: ELIFN
            lifnr(010),
    data element: EMATNR
            ematn(018),
    data element: BSTMG
            menge(017),
    data element: EWERK
            werks(004),
       END OF item_itab.
    CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
            CODEPAGE                = ' '
             filename                = 'c:/hello.txt'
             filetype                = 'ASC'
            HEADLEN                 = ' '
            LINE_EXIT               = ' '
            TRUNCLEN                = ' '
            USER_FORM               = ' '
            USER_PROG               = ' '
            DAT_D_FORMAT            = ' '
       IMPORTING
            FILELENGTH              =
         TABLES
              data_tab                = record
       EXCEPTIONS
            CONVERSION_ERROR        = 1
            FILE_OPEN_ERROR         = 2
            FILE_READ_ERROR         = 3
            INVALID_TYPE            = 4
            NO_BATCH                = 5
            UNKNOWN_ERROR           = 6
            INVALID_TABLE_WIDTH     = 7
            GUI_REFUSE_FILETRANSFER = 8
            CUSTOMER_ERROR          = 9
            OTHERS                  = 10
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT record.
      ON CHANGE OF record-lifnr.
        head_itab-lifnr = record-lifnr.
        head_itab-ekorg = record-ekorg.
        head_itab-ekgrp = record-ekgrp.
        APPEND head_itab.
        CLEAR head_itab.
      ENDON.
    TO HAVE LINK BETWEEN HEADER AND ITEM TABLE USE LIFNR AS LINKER
      item_itab-lifnr = record-lifnr.
      item_itab-ematn = record-ematn.
      item_itab-menge = record-menge.
      item_itab-werks = record-werks.
      APPEND item_itab.
      CLEAR item_itab.
    ENDLOOP.
    *TO CHECH THE DATA IN HEADET ITAB AND DETAIL/ITEM ITAB
    *loop at head_itab.
    *write :/ head_itab.
    *endloop.
    *skip 2.
    *loop at item_itab.
    *write:/ item_itab.
    *endloop.
    SORT head_itab BY lifnr ekorg ekgrp.
    SORT item_itab BY lifnr.
    DATA linecount TYPE i.
    START-OF-SELECTION.
      LOOP AT head_itab.
        ON CHANGE OF head_itab-lifnr.
          REFRESH bdcdat.
          CLEAR bdcdat.
          PERFORM bdc_dynpro      USING 'SAPMM06E' '0100'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EKKO-LIFNR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'EKKO-LIFNR'
                          head_itab-lifnr.
          PERFORM bdc_field       USING 'EKKO-EKORG'
                                        head_itab-ekorg.
          PERFORM bdc_field       USING 'EKKO-EKGRP'
                                        head_itab-ekgrp.
          linecount = 0.
    <b>
          LOOP AT item_itab WHERE lifnr = head_itab-lifnr.
            linecount = linecount + 1.
            IF linecount = 1.</b>
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'EKPO-WERKS(01)'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'EKPO-EMATN(01)'
                                            item_itab-ematn.
              PERFORM bdc_field       USING 'EKPO-MENGE(01)'
                                            item_itab-menge.
              PERFORM bdc_field       USING 'EKPO-WERKS(01)'
                                            item_itab-werks.
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
            ELSE.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'EKPO-WERKS(02)'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=NP'.
              PERFORM bdc_field       USING 'EKPO-EMATN(02)'
                                            item_itab-ematn.
              PERFORM bdc_field       USING 'EKPO-MENGE(02)'
                                            item_itab-menge.
              PERFORM bdc_field       USING 'EKPO-WERKS(02)'
                                            item_itab-werks.
              PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
            ENDIF.
            AT END OF lifnr.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '=BU'.
            ENDAT.
          ENDLOOP.
        ENDON.
        CALL TRANSACTION 'ME21' USING bdcdat MODE 'A'.
        REFRESH bdcdat.
      ENDLOOP.
    FORM bdc_dynpro USING value(a) value(b).
      bdcdat-program = a.
      bdcdat-dynpro = b.
      bdcdat-dynbegin = 'X'.
      APPEND bdcdat.
      CLEAR bdcdat.
    ENDFORM.
    FORM bdc_field USING value(c) value(d).
      bdcdat-fnam = c.
      bdcdat-fval = d.
      APPEND bdcdat.
      CLEAR bdcdat.
    ENDFORM.

  • How to handle line item for posting a document

    Hello,
    I am using a function module to post a document, so far I have hard coded all the values in the test program. I am passing two internal tables to the function module, one which has header data and the other which has line item data. So far I have written the following code to get the line item details:
    it_bseg-BUKRS = '001'.
    it_bseg-GJAHR = u20182010u2019.
    it_bseg-BUZEI = '001'.
    it_bseg-BSCHL = '31'.
    it_bseg-WRBTR = '900'.
    it_bseg-PSWSl = 'USD'.
    it_bseg-SAKNR = u20180000123456u2019.
    it_bseg-HKONT = u20180000123456u2019.
    it_bseg-LIFNR = u2018001234567u2019.
    append it_bseg to lt_temp_bseg.
    clear it_bseg.
    it_bseg-BUKRS = '001'.
    it_bseg-GJAHR = '2010'.
    it_bseg-BUZEI = '002'.
    it_bseg-BSCHL = '40'.
    it_bseg-WRBTR = '900''.
    it_bseg-PSWSL = 'USD'.
    it_bseg-KOSTL = '1111871234'.
    it_bseg-XKRES = 'X'.
    it_bseg-HKONT = '0000564738'.
    it_bseg-FISTL = '1234556000'.
    it_bseg-GEBER = '0000001'.
    it_bseg-fkber = '0'.
    append it_bseg to lt_temp_bseg.
    clear it_bseg.
    Now I want to get rid of the way I am handling the line item and want to handle it based on what user enters. For example right now only line item is being considered but if user enters two line items then what should be the approach.
    Thank you,
    Rajeev Gupta

    Any Suggestion.

  • Dynamic item proposal

    Dear Gurus
    Can any one tell me the configuration of Dynamic item proposal
    Thnaks in advance
    Sneha Reddy

    Dynamic Product Proposal
    A product proposal is a list of products for a specific customer that is automatically proposed during sales document processing. You can decide for yourself which materials should be displayed as product proposals in the sales document. You can also determine the sequence in which the materials appear in the product proposal.
    During sales document processing, the system displays a product proposal in the item overview according to the customer and the business transaction. It displays the material number, material description, and historical order quantites in the sales unit last used. To use a material again, you just have to copy it. The system does not run the standard checks (pricing, availability, incompletion, material determination, free goods determination and so on) until you have entered the order quantities.
    The product proposal is both an entry help and an aid to sales support and promotions. It is particularly useful in Telesales, where the employee automatically receives a display of all the materials that are of interest to a particular customer. This helps them to provide appropriate advice to the customer quickly and easily. The sales document history enables you to analyse the purchasing behaviour of a customer and recognize early on if it changes, for instance, when the customer suddenly stops ordering a product.
    The product proposal differs to cross-selling in that it is dependent on the customer and sales area, and is displayed in the sales document as soon as you have entered a customer. Cross-selling, on the other hand, is triggered by a material. In other words, the system proposes cross-selling materials according to the material or a characteristic of the material you have entered.
    You can determine the product proposal from different data sources:
    •     Order history
    •     Listed materials
    •     Excluded materials
    •     Item proposal
    •     Customer-material info records
    •     Customer-specific data sources
    You can combine materials from these data sources to create a product proposal. The system then accesses the data sources either online or in the background.
    To define a product proposal for sales document processing, you must carry out the following activities in Customizing:
    •     Define customer procedure for product proposal
    •     Define document procedure for product proposal
    •     Assign document procedure for product proposal to order types
    •     Maintain table of origin for product proposal
    •     Define product proposal procedure and determine access sequences
    •     Maintain procedure determination (in background) for product proposal
    •     Maintain procedure determination (online) for product proposal
    The product proposal procedure determines how the system displays the product proposal in the sales document. For instance, if the system has accessed the order history, it determines how many columns should be displayed in the sales document, in which period intervals thehistoric order quantities should be displayed (for instance, day, week, or month), and most importantly, the sequence in which the system should access the data sources (for example, order history, listing, exclusion).
    The product proposal procedure depends on the:
    •     Customer determination procedure
    The customer procedure determines which product proposal procedure the system automatically uses when you create a sales document for a particular customer.
    It is specified in the customer master record per sales area.
    •     Document determination procedure
    The document procedure determines which product proposal procedure the system automatically uses for a certain document type. The document procedure is stored as a key in the header for the sales document type.
    If you use online processing, the product proposal procedure is determined according to the customer and document determination procedures.
    If you use background processing, the product proposal procedure is determined according to the sales area in the customer master and the customer determination procedure. It does not use the document determination procedure because the document type is not recognized in background processing.
    It will help .
    Regards,
    Subbarao

  • How to handle ovedue items in Credit Mgt OVA8

    My requirement was that to handle Overdue items in Credit Maanagement in the TCode OVA8
    Regards
    Madhav

    hi Madhav:
      you can first mark  the [tab] check  field "static" as selected  and second:"reaction" choose D :like
    B+value by which the credit limit has been exceeded.
    By setting this when  over quantities the order cannot be saved.
    If there existing over date checking you can mark the NextReview date  and also chose D in the reaction
    field.
    Regards
    Yu Chaoqun
    Jan,07,2008

  • Item data not getting populated correctly

    Hi All,
    I am using the following code to fill item data while creating order using BAPI_BUSPROCESSND_CREATEMULTI.
    loop.
    *----Fill the Item details
    lv_number = lv_number + 10.
    lv_schdno = lv_cshdno + 1.
      ls_item-handle            = '0000000001'.
      ls_item-header_handle     = '0000000001'.
      ls_item-ordered_prod      = lv_ordered_prod.  "material
      ls_item-number_int        = lv_number.
      INSERT ls_item INTO TABLE lt_item.
    *----Fill the Scheduline Details
      ls_scheduleline-item_handle      = '0000000001'.
      ls_scheduleline-handle           = '0000000001'.
      ls_scheduleline-quantity         = lv_quan.
      ls_scheduleline-schedlin_no      = lv_schdno.
      INSERT ls_scheduleline INTO TABLE lt_scheduleline.
    endloop.
    Order is getting created fine but it has only the last item. Previous line items are not getting added to the order. Do I need to pass any other parameters ot the item or scheduleline table?
    Please help me.
    Thanks in Advance!
    Sonali.

    Hi Marisa,
    Thank you for the reply!
    I have incremented the ls_item-handle and ls_item-header_handle fields. Now it is taking the first line item only and ignoring the rest of them.
    Should I increment the ls_input-fields-ref_handle value also?
    Thanks,
    Sonali.

  • To delete the IDOC Segment in the Inbound i.e.Item Data

    Hi All,
    Idoc is received for orders05 as inbound.
    The IDoc Data contains two levels of item data
    i.e. Segment E1EDP01 - In this we Pass only the quantity.
          in the Sub Segment of item E1EDP19 - Customer Material in the segment IDTNR with qualifier 002.
    The same segment is repeated again but the customer material is different.
    Now need to check the material, if it is different, i need to delete the entire second item segment and put the customer material in the Segment E1EDP19 which has empty field.
    His there any Function Module or so to delete the incoming data of the idoc through inbound?.
    Could you please let me know if there any way to do the same.
    Thank you.
    Regards,
    Dinesh.

    yes here you can access only one segment, if you don't control that here, then the information will be populated to xvbap. or else you can even try to implement the error handling exit EXIT_SAPLVEDA_008 /EXIT_SAPLVEDA_011
    already item information will be populated to xvbap  table . so try to delete the item from xvbap also

  • DLINR - Dynamic Item number - problem, please help

    Hi,
    We have a problem with one of our quotation enhancements:
    For DP82, we have an enhancement in place for one of our DIP profiles.
    Anyway, we are sending component data to DP82 with several custom fields in place. In our enhancement, Dynamic item numbers (DLINR) are assigned to the components via FM AD11_DLI_GET.
    However, some of the components are assigned the same DLINR number.
    The problem with this is that after our enhancement runs, a standard program calls a standard FM that reads back our component data (FM AD15_DLIS_FOR_OBJECTS_READ). The data read back shows all components with the same DLINR numbers combined into one component. This is wrong.
    What is the importance of DLINR (dynamic item) numbers? Do they need to be assigned?
    What do I do?
    Please help.
    Regards,
    Laura

    Hi,
    We have a problem with one of our quotation enhancements:
    For DP82, we have an enhancement in place for one of our DIP profiles.
    Anyway, we are sending component data to DP82 with several custom fields in place. In our enhancement, Dynamic item numbers (DLINR) are assigned to the components via FM AD11_DLI_GET.
    However, some of the components are assigned the same DLINR number.
    The problem with this is that after our enhancement runs, a standard program calls a standard FM that reads back our component data (FM AD15_DLIS_FOR_OBJECTS_READ). The data read back shows all components with the same DLINR numbers combined into one component. This is wrong.
    What is the importance of DLINR (dynamic item) numbers? Do they need to be assigned?
    What do I do?
    Please help.
    Regards,
    Laura

Maybe you are looking for

  • Help on Scope of Subject and WLSPrincipal

    Hi, I am trying to understand the scope of WLSPrincipal. Does it span across various authenticators. For example, I have the following authenticators set DefaultAuthenticator (req) IplanetAuthenticator (sufficient) goes to DS1 and has user John. Ipla

  • Unlocking code nokia C3-00

    hi, i have a nokia C3-00 need unloking code; can you people help me Moderator's note: We have removed personal information from your post because we do not recommend you sharing this on a public discussions board.

  • Selection screen dialog programming

    I have used a selection screen in the dialog programming. I have written some code in the at selection screen to display the output on a table control in another screen 1001. my problem is that when i try to enter the multiple values for material , i

  • Packaging for Performance

    The section "About Application Classloaders" of the documentation for WebLogic Server 6.1 has the following: When WebLogic Server deploys an application, it creates two new classloaders: one for EJBs and one for Web applications. The EJB classloader

  • I messed up my Ipod Nano ...

    i connected my new Ipod nano 4g (that i got for birthday :D) to my PC and now every time i turn it on i get a picture of file and a "!" and link to go to apple support site , the problem is that there is no official apple shop in serbia and i got my