Populating a segment in the target idoc based on dif

Hi
We have E1MARCM, E1MBEWM and ZE1MARCM (constum segment) in the material IDOC and we map the idoc to similar idoc which has same sement in the target idoc material idoc.
ZE1MARCM segment is the custom segment and is the subsegment of E1MARCM. while populating the target idoc segment, we are taking the values from E1MBEWM segment and populting in ZE1MARCM, but the problem is as ZE1MARCM doesnt get populated unless E1MARCM gets populated in the source, So, we need to manually populate E1MARCM in the target message with some default valaues incase we dont have E1MARCM coming in the source. Just would like to know what is the effort in the XI side. Is it a good design to implement this in XI or should we change the ABAP in the ERP side to always populate the E1MARCM on the source idoc which is a standard idoc.

we need to manually populate E1MARCM in the target message with some default valaues incase we dont have E1MARCM coming in the source.
Use mapWithDefault std function or ifelse function in PI. It solves your issue.
Is it a good design to implement this in XI or should we change the ABAP in the ERP side to always populate the E1MARCM on the source idoc which is a standard idoc.
It anyways dont take much effort in doing so in XI. If you can do so in ABAP, even that would be fine.
Regards,
Swetha

Similar Messages

  • Suppressing a segment in the target based on condition

    Hi Guys,
       Iam working on an interface which has a requirement in which we need to suppress the segment in the target XML file of the IDOC Structure, Based on the data coming from a particular field in the Source IDOC iam doing a java lookup, if the condition fails in the lookup it should suppress the segment in the target XML file of the IDOC.The occurance of the particular segment in the IDOC is 0 to 999999.
    Kindly throw some light on the procedure in which this can be acheived.
    Any sort of suggestions regarding this are appreciated.
    Thanks in Advance.
    Praveen.

    May be it help you:
    (not so trivial solution)
    Try to create Advanced User-Defined function (in mapping designer) with at least 2 parameters. (first - this segment, second - particular field) (check "Cache entire queue" option)
      something like this:
    public void Suppress(String[] a, String[] b, ResultList result, Container container){
        String segment = a[0];
        for(int i=0; i < b.length; i++) {
           String data = b<i>;
           if(data != null and data.equals('race conditions')) {
             result.addValue(segment);
             break;
           }else {
             //ignore.
             //note: for empty segment - result.addSuppress()

  • How to create multiple segments on the target structure of an IDOC

    Hi All
       I am working on the Shipment Confirmation Interface( Message Type SHPCON ) which is FILE to IDOC Scenario. I have a segment called E1EDL18 which occurs only once on the target side of the idoc. Now I have to created multiple E1EDl18 segments for the Qualifiers ORI, PGI and PCK. I treid to send a constant ORI,PGI,PCK and then used an user defined function which splits the constant at COMMA and then I am assigning to the target field QUALF. In the display queue for QUALF I see three values with context but still only one E1EDL!* segment is created. Please let me know how to create multiple E1EDl18 segments for three qualifiers.
    Thanks
    Naga

    In message Mapping, just right click on the segment and click on duplicate subtree. now it will create you another segment with same name and fields in it..
    you can hard code the Qual, or you can map the required source field into it.

  • XSLT - repeating the target schema based on repetition of input node

    Hi All,
    I a requirement where all the elements in the target schema of the transformation must repeat based on repetition if a id in the input schema.
    XML 1:
    <root>
    <Productcollection>
    <productdesc>string 1</productdesc>
    productmanfdate>mm/dd/yyyy</productmanfdate>
    <ProductID>
    <productCode>100</productCode>
    <productCode>101</productCode>
    <productCode>102</productCode>
    </ProductID>
    </Productcollection>
    </root>
    the required output XML is:
    <root>
    <Productcollection>
    <productdesc>string 1</productdesc>
    productmanfdate>mm/dd/yyyy</productmanfdate>
    <productCode>100</productCode>
    </Productcollection>
    <Productcollection>
    <productdesc>string 1</productdesc>
    productmanfdate>mm/dd/yyyy</productmanfdate>
    <productCode>101</productCode>
    </Productcollection>
    <Productcollection>
    <productdesc>string 1</productdesc>
    productmanfdate>mm/dd/yyyy</productmanfdate>
    <productCode>102</productCode>
    </Productcollection>
    </root>
    Can anyone please help me out on how to do this type of transformation.
    Thanks

    I tried the same...the problem iam facing is that the target schema is repeated for the exact count of the <productcode> but the the value is 100 for all three.
    I am mapping this <productcode> in the source schema to <ProductIDCode> element in the target schema.
    the output iam getting is as below:
    <root>
    <Productcollection>
    <productdesc>string 1</productdesc>
    <productmanfdate>mm/dd/yyyy</productmanfdate>
    <ProductIDCode>100</ProductIDCode>
    </Productcollection>
    <Productcollection>
    <productdesc>string 1</productdesc>
    productmanfdate>mm/dd/yyyy</productmanfdate>
    <ProductIDCode>100</ProductIDCode>
    </Productcollection>
    <Productcollection>
    <productdesc>string 1</productdesc>
    productmanfdate>mm/dd/yyyy</productmanfdate>
    <ProductIDCode>100</ProductIDCode>
    </Productcollection>
    </root>
    Please advice.

  • Populating serial number in the Inbound IDOC WMMBID01

    I have the requirement in my project to populate Serial number via incoming idoc WMMBID01. I have created an extended idoc with a Z segment added to IDOC WMMBID01. Could anybody please let me know what would be the posting logic for this serial number.
    Thanks,
    Chenni.

    Hi,     
    Maintain partner profile (Transaction code WE20) for the message type you defined in WE81 and put your process code in partner profile and check your logical system settings also in transaction SALE.
    Thanks
    Rahul

  • Repeat segment in the same idoc

    Hi!!
    It is not possible to repeat the same segment in different positions of an idoc. Is there another possibility of having the same segment than copying the segment?.
    Thanks in advance.
    regards
    Example:
    A1 child B1
    A2 child B1

    Sorry, i don´t know if i have explain clearly, i am talking about the idoc definition, i need to have the same segment  being child of different segment parents.
    thanks in advance
    regards

  • How to update the Sent Idoc Status based on the Response From Webservice

    Hi All,
    I have to develop Idoc--SOAP Sync Process Scenario Using BPM .
    I have configured every thing using BPM and mapped
    MATMAS----SOAP Request
    SOAP Resp----STATUS.SYSTAT01
    In R/3  the Main Idoc Number(MATMAS) Status needs to be update , but it is creating the new Idoc with STATUS.SYSTAT01.
    I have used STATUS.SYSTAT01 Idoc to Update the status of the Original idoc based on the Response that is coming from webservice .
    I was posted the same thread a days ago and there Bhavesh suggested me some sugessions.
    How can we make the status of the Idoc based on some response Text
    iam unable to follow OR not able to clear my self on this.
    Please suggest me or give some over view kind of thing on this
    Regards

    Hi Suman,
    It is clearly mentioned in SAP help that "SAP Intermediate Documents (IDOCS) are EDI like documents that are asynchronous in nature."
    So Your Scenario is Asynch(receive) - Synch(WS call) -Transformation (Multimapping)- Asynch(Send to R/3).
    now go in this way:
    you can develop all the message Interfaces  of  Abstract catagory (not manditory )
    MI_AA_MATMAS   -> Abstract Asynchronous message    interface for your Matmas IDOC
    MI_AS_SOAP_ReqandResp  -> Abstarct Syncronous MI for SOAP request and response.
    MI_AA_STATUS ->Abstract Asyncronous MI for Status Idoc
    MI_AA_SOAP_Req ->  Abstarct Asyncronous MI for SOAP request .
    MI_AA_SOAP_Res ->  Abstarct Asyncronous MI for SOAP response .
    Thats all in Message interface.
    your first reciever :
    (This will receive the message asynchronously from R/3)
    create a conatainer varaiable (say preceive) and assign it message interface MI_AA_MATMAS
    Now in thw Propert TAB of this step: give this message name.
    Step2: Synchronous call :
    create container Variable psoaprequest and psoapresponse  give abstract message interface MI_AA_SOAP_Req and MI_AA_SOAP_Req  resp.
    Now in thw Propert TAB of this step:
    Synchronous Interface : MI_AS_SOAP_ReqandResp
    Request Message : psoaprequest
    Response Message: psoapresponse
    Transformation Step :
    Here you will specify Interface Mapping that will conatain Multimapping between Synch Response - MATMAs and STATUS
    Let's name it as IM_ResandMatmasToStatus
    create a container variable as pstatus and assign it abstract interface MI_AA_STATUS.
    In Property pan of this step :
    Interface mapping :IM_ResandMatmasToStatus
    Source Message :psoapresponse
                                preceive
    (IT will ask you for two source messages as IM selected in this transformation has 2 source messages)
    Target Message :pstatus
    Send step:
    Select a message as pstatus.
    thats all in IR.
    If have doubt in ID just let me know.
    Thanks
    Sunil Singh

  • What is max no, min no asked when attaching a segment with the idoc in we30

    hi,
    when creating a new idoc i am attaching a segment with the new idoc its asking for Maximum number, minimum number . what is this maximum and minimum number.

    hi preetha,
    Segm.type       Z1xxxxH    
    mandaotry segment Y                           
    Minimum number  1          
    Maximum number  1          
    Parent segment             
    Hier.level      1          
    min and max are 1 for header denoted as XXXXH
    this is one segment that is assigned to the idoc.
    in defining idoc u need to assign the number of header and child segments..
    a child segment will be like this                                   
    segment.type       ZXXXXD             
    minimum number  1                   
    maximum number  6                   
    parent segment  ZxxxxH             
    hier.level      2                   
    zxxxd is the child segment with 6 entry levels
    this tells u the maximum number for the child level              
    means more than 6 are not to be see if u open the idoc in we19.
    all in
    this idoc has 1 parent segment (one entry)
                  1 child segment  (6 entries)
    hope this helps
    regards,
    Vijay

  • Creating target field based on input node

    Hi all,
      I'm facing a problem in creating the target node based on input node. See if the input node value is repeated I don't want to create the target field for the second occurrence.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_temp xmlns:ns0="urn:test">
       <row>
          <temp_id>1002</temp_id>
       </row>
       <row>
          <temp_id>1002</temp_id>
       </row>
    </ns0:MT_ItemEvent>
    In the above structure you can see the temp_id is repeated , I want to create only one target node. Plz help me to solve this.

    HI,
    Use the UDF and in that use Vector to create the result list with the values.
    use temp_id as imput and before that remove context
    after the UDF use the Splitbyvalue
    See the below code
    String () a;
    Vector prod = new Vector();
    for (i=0;i<a.length;i++){
    if(!prod.contains(a(i))) prod.add(a(i));
    Collections.sort(prod);
    for(i=0;i<prod.size();i++){
    result.addValue((String) prod.get(i));
    Regards
    Chilla

  • Mapping Issue: Target IDoc structure not getting created properly

    Hi Experts,
    I am stuck with a strange problem in my mapping. It is a M:N scenario mapping where we have multiple IDocs in source as well as in target.
    For example, in source Queue-1 I am getting values as [SUPPRESS, true, true, true, true] and in the in source Queue-2 I am getting the values as [1,2,3,4,5]. I used MapWithDefault function to match the number of values in both the queues but in the target IDoc the node (say TMPN) is created only 4 times because of the condition put at the target node. So, the target node should have values as [1,2,3,4] but it gets values as [2,3,4,5] because the first target TMPN node is not created in the first target IDoc. I can provide you with the skeleton of the map. Hope this will give you a fair idea. Let me know if you require more details.
    1. Target Structure:
        IDoc - No TMPN Node
        IDoc - 1 TMPN Node
        IDoc - 2 TMPN nodes
        IDoc - 1 TMPN node
    Condition put on target TMPN_Node ---> (created only 4 times due to condition)
    2. Mapping Skeleton:
    Values coming from Q1 (SUPPRESS, true, true, true, true) --->
                                                                                    \===>FORMATBYEXAMPLE+SPLITBYVALUE==> TMPN-F0 [2]
                                                                                    /                                                                              TMPN-F0 [3]
    Values coming from Q2 (1,2,3,4,5) -
    >                                                                               TMPN-F0 [4]
                                                                                    TMPN-F0 [5]
    Where F0 is  the field which is created when TMPN Node is created. So, if TMPN gets created 6 times, the F0 gets created 6 times.
    Please let me know if there is an alternative to this problem. How can I have values as [1,2,3,4] in field F0 instead of [2,3,4,5]

    hi,
    i got the email.
    as i can see your mapping seams to be rigth, but there is sometrhing i dont get. in a previuos post you said:
    I am stuck with a strange problem in my mapping. It is a M:N scenario mapping where we have multiple IDocs in source as well as in target.
    For example, in source Queue-1 I am getting values as SUPPRESS, true, true, true, true and in the in source Queue-2 I am getting the values as 1,2,3,4,5. I used MapWithDefault function to match the number of values in both the queues but in the target IDoc the node (say TMPN) is created only 4 times because of the condition put at the target node. So, the target node should have values as 1,2,3,4 but it gets values as 2,3,4,5 because the first target TMPN node is not created in the first target IDoc. I can provide you with the skeleton of the map. Hope this will give you a fair idea. Let me know if you require more details.
    1. Target Structure:
    IDoc - No TMPN Node
    IDoc - 1 TMPN Node
    IDoc - 2 TMPN nodes
    IDoc - 1 TMPN node
    lets asume you define as default value "1"
    now, the result of the formatByExample taking the example you sent to me is:
    1,T1,T2,T3,T4 without context change. and the result of the function splitByValue should be what you are specting.
    but its something that is not clear still,
    could you post the result of the mapWithDefault? i think your problem is there.
    Rgds
    RP-.

  • Get Archived IDocs based on IDoc creation date

    Save Our Environment. Save Yourself.
    Hi Experts!!!
    We need to get the archived idocs based on the idoc creation date. If I give some date, then I should get all the idocs that are archived in that period. How can this be possible?
    One more doubt is - I checked the logical path in FILE for archived idocs. But when I go to that in AL11, I can not see any data in that. Where can I find the details of all the archived idocs?
    I serached in SCN for the same but in vain.
    Please help me out. Thanks.
    - I'm not an environmentalist.  I'm an Earth warrior.

    Please find the code to read archeived idocs
    FORM read_datarecord.
      STATICS ls_open TYPE boolean VALUE false.
      DATA: ld_tabix TYPE sytabix,
            lt_edidc TYPE STANDARD TABLE OF edidc,
            ld_edidc TYPE edidc.
      MOVE syst-tabix TO ld_tabix.          
      IF int_edidc-mandt IS NOT INITIAL.
      ELSE.
        IF gd_use_as IS INITIAL.
          IF ls_open = false.
            CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ'
              EXPORTING
                object         = 'IDOC'
              IMPORTING
                archive_handle = gd_archive_handle
              TABLES
                archive_files  = gt_arch_sel.
            MOVE true TO ls_open.
          ENDIF.
          CLEAR ld_edidc.
          WHILE ld_edidc-docnum <> int_edidc-docnum.
            CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT'
              EXPORTING
                archive_handle = gd_archive_handle
              EXCEPTIONS
                end_of_file    = 1.
            IF syst-subrc IS INITIAL.
              REFRESH lt_edidc.
              CALL FUNCTION 'IDOC_ARCHIVE_GET_TABLE'
                EXPORTING
                  archive_handle   = gd_archive_handle
                  record_structure = 'EDIDC'
                TABLES
                  t_data           = lt_edidc.
              READ TABLE lt_edidc INTO ld_edidc INDEX 1.
              IF ld_edidc-docnum = int_edidc-docnum.
                CALL FUNCTION 'IDOC_ARCHIVE_GET_TABLE'
                  EXPORTING
                    archive_handle   = gd_archive_handle
                    record_structure = 'EDIDD'
                  TABLES
                    t_data           = int_edidd.
              ENDIF.
            ELSE.
              EXIT.
            ENDIF.
          ENDWHILE.
        ELSE.
          CALL FUNCTION 'EDI_IDOC_GET_FROM_ARCHIVE'
            EXPORTING
              docnum                       = int_edidc-docnum
            TABLES
              int_edidd                    = int_edidd
            EXCEPTIONS
              idoc_not_in_infostructures   = 1
              idoc_read_error_from_archive = 2
              archive_close_error          = 3
              others                       = 4.
          IF sy-subrc <> 0.
          ENDIF.
        ENDIF.
      ENDIF.
      IF ls_open = true AND ld_tabix = anz_int_edidc.
        CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
          EXPORTING
            archive_handle = gd_archive_handle.
      ENDIF.
    ENDFORM.                               " READ_DATARECORD
    PS if you don't have auth to SARA then get auth . you need to talk to your business owner or talk to basis to get auth

  • Empty target Idoc Fields

    Hi to all,
    I have a File to IDoc scenario. I want to obtain in the target IDoc also the empty fields that in my Graphical Mapping are filled with an empty constant. However, when I go on SAP R/3 to see the produced IDoc, I see that all fields that I have mapped with an empty constant, are absent. I don't want this!!! I want to display this fields with no values!
    How can I do this?
    Thanks!

    Hi,
      what you do change the occurenace of the field min occurence : 1 so that when you map the souce field constact then the target field will come..
      after importing the idoc..export the idoc and change the occurence where ever you required and import this using external schema...then rest all the steps...
    why it is absent IDOC meanns..those fields are empty that might be the problem.
      Just try for 1 field if it's work..then go ahead.
    Regards,
    Venu.

  • Error When canceling the released idoc ?

    Hi All,
    I am getting the following error when i try to cancel the releaseed idoc.
    " There are already views referring to extension ZG_ORDERS05. The release can only be reset if no assignments between views and extensions exist. "
    Can anyone tel me how to solve this error and add a new segment to the released idoc ?
    Thanks.

    hi,
    i think you are using a view for this idoc.
    1. Check: WE20 and open your receiverdetermination.
    2. Open your Outbound parameter settings
    3. check the view settings at the bottom of the first tab. Are you using a view ?
    if yes... check transaction WE32 and remove the view.
    maybe it´s useful!
    Gordon

  • End Routine - populating Target Field based on Master Data

    Hi,
    I have an issue with my End Routine in BI 7.0. The scenario is as follows....
    The Target-Fields ZSALES_OFFICE , 0SALES_CHANNEL etc. are being mapped 1:1 from their respective source fields. In addition to these target fields I have a target field 0SALESORG which I need to populate based on the values from 0COMP_CODE which is an attribute of ZSALES_OFFICE. The values of 0COMP_CODE are 9000, 9001, 9002 and 9003 respectively. The end routine condition needs to be implemented as follows...
    For every 0COMP_CODE which has value 9000, 0SALESORG should be populated with the value "EAST". Similarly for every 0COMP_CODE which has value 9001, 0SALESORG should be populated with the value "WEST",  for every 0COMP_CODE which has value 9002, 0SALESORG should be populated with the value "NORTH" and  for every 0COMP_CODE which has value 9003, 0SALESORG should be populated with the value "SOUTH". I tried the following code but it doesnt seem to work. Could you pls help!!
    Thanks,
    SD
    DATA: it_tab4 TYPE TABLE OF /BIC/PZF31SALOFF,
              wa_tab4 TYPE /BIC/PZF31SALOFF.
        SELECT *
          FROM /BIC/PZF31SALOFF
        INTO CORRESPONDING FIELDS OF TABLE it_tab4.
        sort it_tab4 by /BIC/ZF31SALOFF.
        LOOP AT RESULT_PACKAGE
          INTO <result_fields>.
          read table it_tab4
          with key /BIC/ZF31SALOFF = <result_fields>-/BIC/ZF31SALOFF
          into wa_tab4
          binary search.
          if sy-subrc eq 0.
            CASE wa_tab4-comp_code.
              WHEN '9000'.
                <result_fields>-salesorg = 'EAST'.
              WHEN '9100'.
                <result_fields>-salesorg = 'WEST'.
              WHEN '9200'.
                <result_fields>-salesorg = 'NORTH'.
              WHEN '9300'.
                <result_fields>-salesorg = 'SOUTH'.
              MODIFY it_tab4 FROM wa_tab4.
            ENDCASE.
          endif.
        ENDLOOP.

    Replace your select statement ,
    SELECT *
    FROM /BIC/PZF31SALOFF
    INTO CORRESPONDING FIELDS OF TABLE it_tab4.
    instead of selecting all the fields , pick only the fields which are required.(one good performance improvement)
    SELECT    /BIC/PZF31SALOFF  comp_code
    FROM /BIC/PZF31SALOFF
    INTO CORRESPONDING FIELDS OF TABLE it_tab4.
    Remove the line below , this is not required
    MODIFY it_tab4 FROM wa_tab4.

  • Creating a target group based on the BP email address only in CRM

    Hi there,
    I am currently trying to create a target group based on the business partner email address only.
    I have a list of over 1000 email addresses - these email addresses equate to a BP in our CRM system, however I do not have a list of the equivalent business partner numbers, all I have to work on are the email addresses.  With these 1000 BP email addresses I need to update the marketing attributes of each of these 1000 BP records in CRM.
    What I need is a method to find the 1000 BP numbers based on the email addresses and then use the marketing expert tool (tx. CRMD_MKT_TOOLS) to change the marketing attributes on all of the 1000 BPs.
    The issue I am having is how can I find the list of BP numbers just based on the BP email address, I tried creating an infoset based on table BUT000, BUT020 and ADR6 but I after creating attribute list & data source for this I am stuck on what to do next. In the attribute list the selection criteria does not allow me to import a file for the selection range.  I can only enter a value but I have 1000 email addresses and cannot possibly email them manually in the filter for the attribute list.   I also looked at imported a file into the target group but I do not have any BP numbers so this will not work.
    Does anyone know a method where I can create a target group based on the email addresses only without having to do any code?
    Any help would be most appreciated.
    Kind regard
    JoJo

    Hi JoJo ,
    The below report will return you BP GUID from emails that is stored in a single column .xls file and assign the BP to a target group.
    REPORT  zexcel.
    * G L O B A L D A T A D E C L A R A T I O N
    TYPE-POOLS : ole2.
    TYPES : BEGIN OF typ_xl_line,
    email TYPE ad_smtpadr,
    END OF typ_xl_line.
    TYPES : typ_xl_tab TYPE TABLE OF typ_xl_line.
    DATA : t_data TYPE typ_xl_tab,
           lt_bu_guid TYPE TABLE OF bu_partner_guid,
           ls_bu_guid TYPE  bu_partner_guid,
           lt_guids TYPE TABLE OF bapi1185_bp,
           ls_guids TYPE  bapi1185_bp,
           lt_return TYPE bapiret2_t.
    * S E L E C T I O N S C R E E N L A Y O U T
    PARAMETERS : p_xfile TYPE localfile,
                  p_tgguid TYPE bapi1185_key .
    * E V E N T - A T S E L E C T I O N S C R E E N
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xfile.
       CALL FUNCTION 'WS_FILENAME_GET'
         IMPORTING
           filename         = p_xfile
         EXCEPTIONS
           inv_winsys       = 1
           no_batch         = 2
           selection_cancel = 3
           selection_error  = 4
           OTHERS           = 5.
       IF sy-subrc <> 0.
         CLEAR p_xfile.
       ENDIF.
    * E V E N T - S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
    * Get data from Excel File
       PERFORM sub_import_from_excel USING p_xfile
       CHANGING t_data.
       SELECT but000~partner_guid FROM but000 INNER JOIN but020 ON
    but000~partner =
       but020~partner
         INNER JOIN adr6 ON but020~addrnumber = adr6~addrnumber INTO TABLE
    lt_bu_guid FOR ALL ENTRIES IN t_data WHERE adr6~smtp_addr =
    t_data-email.
       CLEAR: lt_guids,ls_guids.
       LOOP AT lt_bu_guid INTO ls_bu_guid.
         ls_guids-bupartnerguid = ls_bu_guid.
         APPEND ls_guids TO lt_guids.
       ENDLOOP.
       CALL FUNCTION 'BAPI_TARGETGROUP_ADD_BP'
         EXPORTING
           targetgroupguid = p_tgguid
         TABLES
           return          = lt_return
           businesspartner = lt_guids.
    *&      Form  SUB_IMPORT_FROM_EXCEL
    *       text
    *      -->U_FILE     text
    *      -->C_DATA     text
    FORM sub_import_from_excel USING u_file TYPE localfile
    CHANGING c_data TYPE typ_xl_tab.
       CONSTANTS : const_max_row TYPE sy-index VALUE '65536'.
       DATA : l_dummy TYPE typ_xl_line,
              cnt_cols TYPE i.
       DATA : h_excel TYPE ole2_object,
              h_wrkbk TYPE ole2_object,
              h_cell TYPE ole2_object.
       DATA : l_row TYPE sy-index,
              l_col TYPE sy-index,
              l_value TYPE string.
       FIELD-SYMBOLS : <fs_dummy> TYPE ANY.
    * Count the number of columns in the internal table.
       DO.
         ASSIGN COMPONENT sy-index OF STRUCTURE l_dummy TO <fs_dummy>.
         IF sy-subrc EQ 0.
           cnt_cols = sy-index.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
    * Create Excel Application.
       CREATE OBJECT h_excel 'Excel.Application'.
       CHECK sy-subrc EQ 0.
    * Get the Workbook object.
       CALL METHOD OF h_excel 'Workbooks' = h_wrkbk.
       CHECK sy-subrc EQ 0.
    * Open the Workbook specified in the filepath.
       CALL METHOD OF h_wrkbk 'Open' EXPORTING #1 = u_file.
       CHECK sy-subrc EQ 0.
    * For all the rows - Max upto 65536.
       DO const_max_row TIMES.
         CLEAR l_dummy.
         l_row = l_row + 1.
    * For all columns in the Internal table.
         CLEAR l_col.
         DO cnt_cols TIMES.
           l_col = l_col + 1.
    * Get the corresponding Cell Object.
           CALL METHOD OF h_excel 'Cells' = h_cell
             EXPORTING #1 = l_row
             #2 = l_col.
           CHECK sy-subrc EQ 0.
    * Get the value of the Cell.
           CLEAR l_value.
           GET PROPERTY OF h_cell 'Value' = l_value.
           CHECK sy-subrc EQ 0.
    * Value Assigned ? pass to internal table.
           CHECK NOT l_value IS INITIAL.
           ASSIGN COMPONENT l_col OF STRUCTURE l_dummy TO <fs_dummy>.
           <fs_dummy> = l_value.
         ENDDO.
    * Check if we have the Work Area populated.
         IF NOT l_dummy IS INITIAL.
           APPEND l_dummy TO c_data.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
    * Now Free all handles.
       FREE OBJECT h_cell.
       FREE OBJECT h_wrkbk.
       FREE OBJECT h_excel.
    ENDFORM. " SUB_IMPORT_FROM_EXCEL
    Just copy paste the code and run the report select any local xls file with emails and pass the target group guid.
    snap shot of excel file:
    Let me know if it was useful.

Maybe you are looking for

  • OIM 9.1.0.2 ORA-0936 encountered when provisioning roles

    I've configured an Access Policy that provisions users without requiring approval to a DB through the DB connector. It also provisions them with roles: CONNECT and DBA. The latter was achieved by making Role provisioning dependent upon User creation

  • Speedgrade - Rectangle appears over footage in Premiere after direct link

    I am using Speedgrade via direct link from Premiere, with a timeline that consists of a video track with all of my clips, another track containing adjustment layers, and a top track containing a .PNG file of a black letterbox.  Problem:  After applyi

  • Error while installing NetWeaver CE 7.2 trial at step 21

    Dear SDN, I am trying to install the NetWeaver CE 7.2 trial version. A the step 21 (u201CInstall Instance basics of SCS01u201D) I get the following error: Message: u201CAn error occurred while processing option SAP NetWeaver Developer Edition > Serve

  • Need some help in after effects cs5

    hello i have a problem in after effets cs5 whit this green cross over the vid andits stays like that even when i render it . can some on help me fix this?

  • "Export to CSV" option is not working.

    Hi, When I am trying to use "Export to CSV" option for "Item Price Deviation" report. The issue happened, when we lock filter on "Spend by Category" report and then opened Item Price Deviation report. Then I selected More Actions --> "Export to CSV".