Suppress Target structure based on condition

Hi
How to suppress target structure based on condition
Example:
Source is like:
<Details>
<Name>abdc</Name>
<ID>234</ID>
<Address>US</Address>
</Details>
I have two target structures
1:
<Details>
<Name>abdc</Name>
<ID>234</ID>
<Address>US</Address>
</Details>
2:
<Error>
    <ErrorID>
</Error>
if Any of the source filed is null then i dont want to map it to source structure. instead I want to assign an error id to ErrrorID node of the target.
example
abc,123,US
abc
in above case second record has two null values
so my target structure should be
<Details>
<Name>abc</Name>
<ID>123</ID>
<Address>US</Address>
</Details>
<Error>
    <ErrorID>2nd record has erro</ErrorID>
</Error>
How to acheive this..
Please help us
Regards
Sowmya

hi ,
plz try the following mapping
Name-->exist-->if than else-> tuue----->Name
                                                    false---(constant)--
error
ID-->exist-->if than else-> tuue----->ID
                                                 false---(constant)--
error
adress-->exist-->if than else-> tuue----->address
                                                      false---(constant)--
error
regards,
navneet

Similar Messages

  • Mapping Issue. Parsing problem to target Fields based on condition.

    Hi All,
    File to Idoc scenario.
    My file looks like below.
    HD 89650 28/01/11 "Presciber tan"
    AF "disc-rsn"
    RK "007287001" A
    KE disc-code "007287"
    KE addr-num "001"
    DF fax-num ""
    DF in-out "I"
    DF phone-2 "23221"
    AF "drs"
    RK "007287" A
    KE dr-num "00221"
    KE addr-num "001"
    DF affil "OPSM"
    DF rec-stat "A"
    DF phone-2 "12444"
    AF "disc-rsn"
    RK "dr-addraddress-1 17287|1EN" A
    KE disc-code "008287"
    KE field-name "address-1"
    KE element " 1"
    DF in-out "I"
    DF phone-2 "1232"
    DF post-code "3109"
    DF provider-num "5349201J"
    DF rec-stat "A"
    T         24
    I need to capture and create target segments only for the values "AF "disc-rsn"".And pass all the relavant rows (RK,KE,DF...) which are under "AF "disc-rsn"" to the target fields.
    I'm struggling to parse the value to the output structure as RK,KE,DF will be present under anywhere like "AF drs", "AF disc-rsn" etc.
    I'm able to create the target segments (2 Zdisc segments as 2 "AF disc-rsn" present in the file), but unable to parse the field values to the target fields.
    Ex: DF phone-2 is present in 8th, 15th,22nd row. I need to pass only 8th and 22nd rows to the target fields.
    After content conversion, My Source XML looks like below.
    <?xml version="1.0" encoding="utf-8" ?>
    - <MT_DiscountDetails>
    - <HD>
      <KeyField>HD</KeyField>
      <HDRow>89650 28/01/11 "Presciber tan"</HDRow>
      </HD>
    - <AF>
      <KeyField>AF</KeyField>
      <AFRow>"disc-rsn"</AFRow>
      </AF>
    - <RK>
      <KeyField>RK</KeyField>
      <RKRow>"007287001" A</RKRow>
      </RK>
    - <KE>
      <KeyField>KE</KeyField>
      <KERow>disc-code "007287"</KERow>
      </KE>
    - <KE>
      <KeyField>KE</KeyField>
      <KERow>addr-num "001"</KERow>
      </KE>
    - <DF>
      <KeyField>DF</KeyField>
      <DFRow>fax-num ""</DFRow>
      </DF>
    - <DF>
      <KeyField>DF</KeyField>
      <DFRow>in-out "I"</DFRow>
      </DF>
    - <DF>
    Is there any way I can acheive my  mapping based on the above condition?? Kindly suggest me.
    Thank you for your time.
    Regards
    Deepthi

    Not required. Using Java function. Solved the issue.

  • How to Archive Files to Two target systems based on Condition

    Hi All,
    Iam doing Idoc--File Interface.
    we have to send the file to Two Different systems based on the plant condition
    If plant = 123 then send to ABC system ELSE if Plant = 999 then send it to XYZ system.
    And Archive the file to one Archive folder of the any one system. this is working fine correctly.
    Archive means not exactly Archiving, just we are droping one more extra file to Archive folder for refference
    Now i need to construct like this
    If plant = 123 then send to ABC system and Archive to Archive directory ELSE if Plant = 999 then send it to XYZ system and Archive to Archive directory.
    Please suggest me on this
    Regards
    Vamsi

    If Plant = 123 then select the BS1(ABC System)
    Ex: //sapdev/test/ABC/item.txt
    For Archive If Plant = 123 then select the BS1(ABC System) Archive folder
    Ex: //sapdev/test/ABC/Archive/item.txt
    If Plant = 999 then select the BS2(XYZ System)
    Ex: //sapdev/test/XYZ/item.txt
    For Archive If Plant = 123 then select the BS2(XYZ System) Archive folder
    Ex: //sapdev/test/XYZ/Archive/item.txt
    Then this becomes very simple:)
    I m assuming you are already using conditional Receiver determination,now for each receiver just configure an extra interface in Interface determination.
    so you will have 2 interface determination and each one of them will have 2 inbound messages,they can use same interface mapping.
    you already will have 1 conditional receiver determination.
    You can also do this via OS script if you have experience in that.
    Thanks
    Aamir

  • Regarding Suppressing the Idoc based on Condition

    Hi All,
    Its File to Idoc one, Here is the logic,
    If Status code = X1 or AB then only create the Idoc AND also create the one one Idoc for each and every line item
    If we have 2 line items from text file, we have to create 2 idocs in ECC.
    We setup in the following way....
    To create the Multiple Idocs for multiple Line items, i changed the IDOC segment Occurence to 0-9999 and Idocs are getting posting correctly.
    The thing is if the status code is either X1 or AB then it is getting creating idocs as per the logic. If the status code is not either one means it is failing in XI MONI.
    please advice me i shld not see the failed message in MONI
    Regards
    Vamsi

    Hi Vamsi,
    If you donot want to generate the IDOC when the Status Code is not X1 or AB, either use create function as mentioned by Raj or also craete a dummy receiver in ID and use conditions in receiver determination and route the data as per the status code.
    If Status Code = X1 or AB                       receiver= idoc
    If Status Code != X1 or AB                      receiver= dummy receiver
    I hope this is helpful.
    Regards,
    Sarvesh Desai

  • Want to generate target structure based on the comparing of records source

    Hi Experts
    i hava an issue here
    I want to generate target sturecture
    My requirement is
    Source                                                   Target
    LPLRecordset                                        PurchaseRecordset
    a                                                             a
    b                                                             b
    c                                                             c
    d                                                             d
    Tax(Subrecordset                                 1
      1                                                            2
      2
    If LPL data is coming it need to populate Purchase Record fields... if tax is coming then it need to populate with LPL with Tax ,
    If tax Recordset is coming twice it need to populate Purchase Recordset ..
    Plz hep me in this
    how to populate the target , If possible with eg

    Source                                                 
    LPLRecordset                                       
    a                                                            
    b                                                           
    c                                                            
    d                                                            
    Tax(Subrecordset                                
      1                                                           
      2
    Target
    PurchaseRecordset
    a
    b
    c
    d
    1
    2
    If LPL data is coming just it should populate a,b,c,d
    If Tax data is coming it need to populate whole purchase record but only 1,2
    if tax data is repeating 2 times it should populate whole purchase record twice with only tax data populate in the target
    How to map from source to target
    Reply me back if you have any queies

  • Message Mapping : content based target structure generation

    Hi Team,
    As per my requirement , mapping should generate target structure based on one "field" value in source srtucture.i.e target structure should generate for some of the custid values  , not for all cust id's . also I dont want empty files .
    Source:
    MT_SOURCE
    -Custid
    -CustName
    Target:
    MT_TARGET
    -Custid
    -CustName
    But I want to generate Target structure MT_TARGET only for custid values' 001,002,003 ; for remaining values I dont want to generate target structure MT_TARGET . Is it possible using graphical mapping.I think UDF is correct oprtion. can you provide sample code for this requirement.
    Thanks.
    Drumi

    But I want to generate Target structure MT_TARGET only for custid values' 001,002,003 ; for remaining values I dont want to generate target structure MT_TARGET . Is it possible using graphical mapping.I think UDF is correct oprtion. can you provide sample code for this requirement.
    might be it is helpful for ur requirement:
    Custid + constant(001) +equals ->(first) if
    Custid->then                                                 
    Custid + constant(002) +equals-> else
    First if ending -> Second if
    Custid->then
    Custid + constant(003) +equals-> Second else ->target Custid

  • 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()

  • Multiple source segments need to map to target  based on conditions

    Hi All,
    I am facing a problem,
    Scenario is like this
    Source structure will be like this
    E1ADRM1 --> occurences 0...99
    E1ADRM1 --> occurences 0...99
    E1ADRM1 --> occurences 0...99
    E1ADRM1 --> occurences 0...99
    Target structure
    I9INPT00  --> occurences 1:1
    Data  comes like this
    1) E1ADRM1 --Partner_Q = AG
       E1ADRM1 --Partner_ID = 0000011223
    2) E1ADRM1 --Partner_Q = OC
       E1ADRM1 --Partner_ID = 0000011224
    3) E1ADRM1 --Partner_Q = WE
       E1ADRM1 --Partner_ID = 0000011565
    4) E1ADRM1 --Partner_Q = GE
       E1ADRM1 --Partner_ID = 0000011446
    Target structure to be mapped
    I9INPT00--<b>PHSHTO</b> with value 0000011223(If AG)
    I9INPT00--<b>PHSOTO</b> with value 0000011565 (if WE)
    the condition is like this
    If E1ADRM1--Partenr_Q = AG then PARTNER_ID has to be mapped to target
    I9INPT00 --> <b>PHSHTO</b>
    If E1ADRM1--Partenr_Q = WE then PARTNER_ID  has to be mapped to target I9INPT00 --> <b>PHSOTO</b>
    I have tried but getting only one value for the first E1EDARM1 = AG and the rest are not at all triggering
    So please can one give suggestions for this...
    Thanks and Regards,
    sridhar
    I

    HI Sridhar,
    If you wanted to generate the target node based on the below conditions, I assume that you will have maximum 4 target node generated based on the below conditions.
    1) E1ADRM1 --Partner_Q = AG
    E1ADRM1 --Partner_ID = 0000011223
    2) E1ADRM1 --Partner_Q = OC
    E1ADRM1 --Partner_ID = 0000011224
    3) E1ADRM1 --Partner_Q = WE
    E1ADRM1 --Partner_ID = 0000011565
    4) E1ADRM1 --Partner_Q = GE
    E1ADRM1 --Partner_ID = 0000011446
    What you can do is you can right click on target node and by selecting dublicate you generate the 4 target node and then you can compare the values of source and if it is AG or GE then mapp the value to target node.
    There will be four different mappings conditions for each target node.
    I think this will work.
    Thnx
    Chirag

  • How to create additional Line in file based on condition available as part of ZINVOIC02 Idoc segment

    Scenario Details:
    Receiving Zinvoic02 Idoc in PI. Idoc to file translation creates comma separated file with .csv extn
    The logic was kept in such a way that how many E1EDP01 (items) are available in IDoc that many no of records will be created in csv file.
    The file logic for some the fields is as below:
    No of records
    InvNumber
    InvDate
    CusNumber
    LineitemDesc
    Tax1Type
    Tax1%
    for 1st E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    Populate when E1EDP04/MSKWZ=O2 or O4 with E1EDP19/KTEXT
    Hardcode when E1EDP04/MSKWZ=O2 or O4
    Sum all E1EDP04 /MSATZ when E1EDP04/MSKWZ=O2 or O4
    for 2nd E1EDP01
    E1EDK01-BELNR
    E1EDK01-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    for 3rd E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    Additional Line to be created when one or more of E1EDP01 is having E1EDP04/MSKWZ = O3
    same as above
    same as above
    same as above
    Hardcode "REIM for USE TAX"
    Hardcode ""
    Hardcode ""
    Now we have got addition requirement to add a new lineitem when tax code is equal to O3 for any of the E1EDP01.
    Is it possible to create additional lineitem based on condition. If yes, please share what should be the approach.
    How we can create the additional lineitem?
    Currently we are using E1EDP01 to do context handling.
    The target structure is :
    MT_FILE
         INVOICE     0..unbounded
              InvNumber     0..1
              InvDate          0..1
              CusNumber     0..1
              LineitemDesc     0..1
              Tax1Type          0..1
              Tax1%               0..1

    Hello,
    Please add one extra field in the data structure of the target mapping and let its occurrence be 0..unbounded under the root node 'MT_ADP_Invoice'.
    Apply the condition, if tax code MSKWZ (with its context changed to E1EDP01) equalsS to '03', then map it to the newly created target field whose occurrence is 0..unbounded.
    This will then create an additional field which is your requirement.
    The above is one way.
    But if you want to have the same target field name as ADP_File appended for tax field being '03'.
    Then in that case you can you two message mapping for one common operational mapping / interface.
    In the first message mapping you need to have one target data structure created with the source data structure remaining the same as the one shown by you in scrn shot. Now this target data structure will be similar to the source, except that you need to add one more field at the end(name different from other fields) in target (whose occurrence should be 0..unbounded), and it needs to be mapped to E1EDP01 provided the tax code field MSKWZ(its context changed to E1EDP01) equalsS to constant '03'.
    In the second message mapping you need to map the target structure of previous message mapping to the actual required structure. The newly added field should be mapped to ADP_File of your final target structure.
    This will then create the same structure as required.
    Note : Please change the occurence of ADP_File to 0..unbounded.
    Regards,
    Souvik

  • I need date mapping Below based on condition?

    Source sidefield:ZALDAT
    Taget Structure mapping condition:
    Format MMDDYY. If check is voided then it should be '000000'
    Taget field:Issue date
    I Need how to mapping source to target field based on conditioin explain me?give me saple mapping given condition?

    Hi,
    Try this udf
    youir input for this udf is "date" (which is a string)
    SimpleDateFormat sdf = new SimpleDateFormat("MMddyy");
    Date testDate = null;
    try
          testDate = sdf.parse(date);
    catch (ParseException e)
         return '000000';
    if (!sdf.format(testDate).equals(date))
        return '000000';
    return testDate.toString();
    code taken and modified from  http://www.dreamincode.net/forums/showtopic14886.htm
    Regards
    suraj
    Edited by: S.R.Suraj on Sep 29, 2009 7:53 AM

  • Creating Files Dynamically based on Condition

    Hi Experts,
    I want to create a scenario in which I want to have N number of target files based on some condition.
    Suppose I have following Source structure .
    <ns0:MT_Employee_Src xmlns:ns0="urn://FileToFile_ERD">
       <Details>
          <EmpId>1</EmpId>
          <Name>Rabi</Name>
          <Designation>ABAP</Designation>
       </Details>
          <EmpId>4</EmpId>
          <Name>Satya</Name>
          <Designation>ABAP</Designation>
       </Details>
    </ns0:MT_Employee_Src>
    My requirement is I want to have 2 different target files based on EmpId.
    And this should be dynamic that means N number of EmpId in my source will create N number of files.
    Can anyone help me to solve this?
    Any kind of suggestion will be appreciated.
    Thanks
    Rabi

    Hi All,
    As my requirement was to create N files dynamically based on some condition so I first used 1:N multimapping without BPM.
    Then I followed RP's steps.
    Follow those steps
    1) in the message Mapping go to Signature T..Outbounded.
    2)later go back to main tab . you shoud create a mapping like this:
    3)<EmpId>--> change the context to MT_Employee_Src. to do that press right button on the field and go to context menu option.
    map this field to the proper header target structure E.X: MT_Employee_Tgt
    4) doing this you will create as many target files as <EmpId> you receive.
    5) map the rest of the fields
    This is great.And  this helped me a lot and finally gave solution.
    I want to share one thing that I faced.
    when you are doing 1:N multi-mapping then you have to change the occurrence of target .
    Then your source and target structure will be changed .If you are taking the source schema from mapping then remove the extra tags those got generated due to multi mapping such as
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    - <ns0:Message1>
    </ns0:Message1>
      </ns0:Messages>
    And then use the file and it will work fine.
    Thanks
    Rabi

  • How to handle 1 Source Structure and N ( multiple Target Structure

    Hi           I have One source structure , Which is Source1 and mulitple target structure which Target1 , Target2 and Target3
    I need Map this Source1 to Target1 and Target2 and Target3 based on the condition of one field of source1
    ianyone please tell me how to do it
    Thanking you
    Sridhar

    Hi Sridhar,
    Yes Multimapping is possible without BPM from SP14 and above. But there are certain limitation on that as well. You can do only 1:N multi mapping and N:1 is not possible without BPM. In the case of 1:N mapping you would need to go for Enhanced Interface Determination and you will have a full advantage of that mapping if you use a adapter other than IDOC, HTTP and XI. In otherwords this holds good for adapters that runs on Adapter framework and not on Integration Engine.
    BPM involved:
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    Without BPM:
    http://help.sap.com/saphelp_nw04/helpdata/en/42/f3b31d48fb1bc8e10000000a11466f/content.htm
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Thanks
    Ravi

  • 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.

  • Table Control - Input Enabling/Diabling of Rows based on Condition.

    Hi,
    In the TC, I want to Input Enable/Disable the rows based on Conditions. The First row is input enabled always. But the other rows, (2nd onwards) need to be Input Enabled/Disabled based on some conditions. It is possible to make this working. Can you please provide me a suitable solution for this?
    Appreciate Your Help.
    Thanks,
    Kannan

    Hi Kannan...
    If we are talking about "Rows"...
    then identify based on some conditions the row numbers and in PBO...loop at screen with screen name..set thier input properties and modify screen (make them input only)
    If we are taking into consideration "columns"
    There is an internal structure COLS where we can identify column number of screen name ...or we can take except for one particular column..
    if some condition satisfied....
    loop at screen where screen-name <> "Column which is input'.
    Loop at screen...and make other columns display only.
    modify screen
    endif.
    Regards
    Byju

  • Calling different pages in a single sap script based on conditions?

    Hi All,
             Can anyone please give me an example of how to call different pages in a single sap script based on condition. Eg., i need to call 5 differnet pages from a single sap script based on 5 company codes.
    Please help
    Regards
    Priya

    This approach to make call from SAPscript. Its concept is similar to make call to a subroutine in another program. I would presume you understand how to use USING and CHANGING parameter. =)
    SAPscript -
    /: Perform get_date in program z_at_date
    /:    using &p_year&
    /:    changing &new_date&
    /: endperform.
    program z_at_date -
    form get_date TABLES rec_in  STRUCTURE itcsy
                                    rec_out STRUCTURE itcsy..
    DATA:
       v_year type char10.
    sap script and subroutine uses itcsy structure to transmit parameters
    first parameter is incoming while second parameter is out going
    their function is like an internal table with header line
    all data types between SAPscript and subroutine are string.
    so, you might need additional conversion.
    read incoming parameter with exact name from SAPscript
      READ TABLE rec_in WITH KEY name = 'P_YEAR'.
      IF sy-subrc EQ 0.
        v_year = rec_in-value.
      ENDIF.
    to return value, use the exact name on the second structure
        CONCATENATE v_year v_year INTO v_year.
        READ TABLE rec_out WITH KEY name = 'NEW_DATE'.
        IF sy-subrc EQ 0.
          rec_out-value = v_year.
          MODIFY rec_out TRANSPORTING value WHERE name = 'NEW_DATE'.
        ENDIF.
    endform.
    Hope this helps =)

Maybe you are looking for

  • IllegalStateException - response has already been commited

    Hi all!           We are running WLS 5.1 sp7 on an NT box.           Our application consists of jsp pages with <jsp:include...>, servlets           and stateful/stateless beans. The only class that actually performs a           forward is a servlet

  • Quicksizer_Server sizing

    Dear All, I have a problem using SAP tool quicksizer for server sizing. We want to do server sizing for FI module to be implemented. I just want clarification that when we have number of documents that are being transferred from FI to  CO-PA-FI, do w

  • PS Elements 3 and LR 3 or 4

    Is PS Elements 3 compatible with Lightroom 3 or 4?

  • Problem in image?

    Hi I am trying to upload an image into server.I have selected image from filesystem and displayed into screen(from server). My problem is when the image size is greater than 10kb(like my pictures in windows),i will get scroll bars in my front end. Ho

  • I want to use Golden Gate to connect MS SQL Server 2005 with Oracle 10g dat

    I want to use Golden Gate to connect MS SQL Server 2005 with Oracle 10g database. So, i have installed both databases on different pc's on windows platform. MS SQL Server 2005 on windows XP and Oracle 10g on windows 2003. I have configure Golden Gate