Method to map mandatory fields of target structure?

Hi all,
is there any way to map mandatory fields of target message structure? i mean other than mannualy going through each and every fields.
Thanks and Regards,
ujwalkumar

Ujwalkumar,
you export the mapping from graphical mapping tool use this option in  theeditor.
In ammping Editor CRTLSHIFTRight click -> Tools->Export .
once you export the XML to our localdesktop make sure the extesion .mte.
you can edit the XML write an XSD defination to define blank values for all blank fields.
Regards
sreeram.g.reddy

Similar Messages

  • Target file name as field in target structure

    Hi SDNers,
    I have a requirement where I need to populate a field in target structure with the target file name, this will be a counter.
    So if the interface is run 2 times already the third file should have name XXXXXXX_03 and also this needs to be mapped to a field in the target structure.
    Any ideas on how to achieve this?
    (Pls Note: I am aware of ASMA and variable substitution)
    Regards,
    Gautam Purohit

    Hello Gautam!
    File adapter - How to pass File name and path at runtime
    This SDN topic probably covers the requirement you mentioned!
    BR,
    Lucas

  • Source of xslt mapping and XSD/ XMT target structures for standard Idocs

    Hi,
    I am working on R/3 - XI - ICH scenario. I need xslt mapping and XSD/ XML target structures for standard IDoc like PROACT01,DELFOR01, DELVRY03. I tried to search it on marketplace but couldn't find it there. As per configuration document, these things are shipped with XI mapping content in live cache CD. But I don't have this CD with me. Can anybody tell me the source for these target structures and mapping program. ( Please share marketplace, site link or send me across the mail [email protected])
    Thank you in advance.
    Anand More.

    Anand the other option is to import the corresponding idocs into your integration repository and then you can view the generated XSD there.
    As regards XSLT mapping, you need to basically first identify as to what form you want to transform your source idoc into.
    For some help on XSLT mapping check the following threads,
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/topusers.jspa%3FforumID%3D44
    https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode1-6&contenttype=url&content=https://Process Integration (PI) & SOA Middleware
    Also have a look at my code samples,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/generic xslt mapping in sap xi, part i.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    cheers
    Sameer

  • Mandatory fields  for mapping in ORDERS idoc.

    Hi
    I m working on File to idoc scenario for creation of sales order in ECC 6.0 , now I want to know what are the mandatory fields in ORDERS idoc which needs to be populated or else disbaled so that the sales order gets created properly in the ECC 6.0..
    Pl let me know the method of finding mandatory field for mapping for  any idoc  and which fileds of idoc are to be disabled.
    Pl help ..
    ans will be rewarded .
    thanks & rgds
    mojib

    HI,
    U can disable the control record segment and in the IDOC adapter use the option apply control record from payload.
    If you have set the Apply Control Record Values from Payload indicator in the receiver IDoc adapter, the following fields are filled from the IDoc-XML payload:
    ·        MESCOD
    ·        MESCFT
    ·        TEST
    ·        EXPRSS
    ·        STD
    ·        STDVRS
    ·        STDMES
    ·        SNDSAD
    ·        SNDLAD
    ·        RCVSAD
    ·        RCVLAD
    ·        REFINT
    ·        REFGRP
    ·        REFMES
    ·        STATUS
    ·        DIRECT
    ·        OUTMOD
    ·        CREDAT
    ·        CRETIM
    read the information in below link:
    http://help.sap.com/saphelp_nw70/helpdata/EN/ab/bdb13b00ae793be10000000a11402f/frameset.htm
    thnx,
    chirag

  • Changing source/target structure without recreating mapping

    Hi Experts,
    There is a requirement where we need to add one field in target structure of an interface. Based on my limited knowledge, I know that if source or target structures are changed then the entire mapping has to be recreated from scrach. Is my understanding correct? If not, how do I go about this change?
    Thanks,
    Dhawal

    In any version of XI/ PI you can insert the new fields/ nodes at the end of the parent segment....if done in this manner then the mapping wont be lost:
    Old:
    <SRC>
    <Name>
    <First>
    </Name>
    </SRC>
    New
    <SRC>
    <Name>
    <First>
    <Last>
    </Name>
    </SRC>
    In this case the mapping wont be lost....however if you add a new node somewhere in middle or at the top of the existsing nodes then mapping will be lost:
    <SRC>
    <Name>
    <Last>
    <First>
    </Name>
    </SRC>
    In short the sequencce of apperance of nodes should not change
    Regards,
    Abhishek.

  • Product upload to R/3. (field z mapping to field standar)

    Hi experts,
    I have a problem and i dont know how to solve it.
    I am uploading products from CRM to R/3. First I do a job calling a report based in a standar function: COM_PRODUCT_API_UPLOAD. This works perfectly, all the products i am uploading I can see in the table: COMM_PR_MATERIAL all the product have been uploaded.
    As the product in CRM system has some z fields, when the material is already in R/3 I do another job based in a batch-input to update some standar fields reading the data from CRM with a RFC function and everything is ok.
    The problem occurs when i am going to modify a product is in both systems.  A delta process upload the data, but only the data standar to R/3. This delta runs once a product is upload by the function standar: COM_PRODUCT_API_UPLOAD, but when i am updating a z field the delta is not launched.
    I know that there is a BADI: PRODUCT_CUSTOMER and this has an method: CRM_TO_R3_PRODUCT. I am trying using this badi for mapping this fields z to structures from R/3: MARA, MARC...but if i modify a field z i dont know how to read it from the screen to update the product when i save.
    Any sugerence or idea how to do it?
    Sorry because my english, is not so good. Regards and thanks in advance,
    Mon

    Hi Mon,
    What you need to do is you need to use PRODUCT_CUSTOMER2 and use the method MAP_CRM_TO_R3_MATERIAL .
    Now coming to your question of reading Z fields. I beleive they are the fields of the Set types that you need to read. now there are two options :
    1. org dependend field
    2. org independent
    for Org-Independent fields  and Org-Dependent which are for Z set types ZOM_<settype name>_GET FM should be automatically generated when u saved the set type. so you can read their values from that FM.
    Please let me know if you still have doubts.
    Regards
    Sidd

  • How to read fields of a structure or Table.

    Hi,
      I had a requirement where i will send a structure/table name into a Form(Subroutine). This form fills an internal table with all the fields in that structure/table .
          Does any one could suggest any programming method to access the field names of structure/table.
          Please don't suggest any database tables, as the structures iam going to send need not exist in database.
         A quick reply is appreciated.
    Thanks in Advance,
    Anvitha.

    HI Anvitha,
    You can use function REUSE_ALV_FIELDCATALOG_MERGE to get the field names and attributes.
    REPORT test.
    TYPE-POOLS : slis.
    DATA : BEGIN OF itab1,
           f1     LIKE vbak-vbeln,
           f2     LIKE vbap-posnr,
           f3     LIKE vbak-netwr,
           END OF itab1.
    DATA : rep TYPE sy-repid      .
    DATA : fcat TYPE  slis_t_fieldcat_alv.
    rep = sy-repid.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       i_program_name               = rep
       i_internal_tabname           = 'ITAB1'
      I_STRUCTURE_NAME             = 'ITAB1'
       i_client_never_display       = 'X'
       i_inclname                   = rep
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        ct_fieldcat                  = fcat
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 2
      OTHERS                       = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    the internal table fcat will have field names and attributes of internal table.
    Reagrds,
    Gagan

  • Map a field more than once in import manager

    Hi experts,
    is it possible to map a source field to more than one destination fields in import manager? E.g. I have a source field "client" and I have to map it to a destination field "client" and also to a combined lookup field which consists of a field "client" and "systemname".
    Thanks for your answers. Regards, bd

    Hi,
    Yes you can achieve this , During Import Manager when mapping source field to target field in Map Field/Values tab, just above this on left hand side you can see Source Hierarchy in MDM Import Manger, Right click on field which you want to map more  than one Destination field, here you get Clone Field option which make clone field , so you can map this clone field to other second destination field which will serve your purpose.
    Hope it will Help you,
    Rewards if Useful.....
    Mandeep Saini

  • Map Header field on Item field

    hello everibody.
    I have a very simple problem but i'm not is possible solve with standard graphycal mapping.
    I need map a field on header structure in all relative field on item structure:
    example:
    inbound message:
    <header>
    <field1>a</field1>
       <row>b</row>
        <row>c</row>
    </header>
    result:
    <header>
    <fieldA>a</fieldA>
        <row>
           <fieldB>a</fieldB>  (this is the field1 value)
           <fieldC>b</fieldC>
        </row>
        <row>
            <fieldB>a</fieldB>   (this is the field1 value)
            <fieldC>c</fieldC>
        </row>
    </header>
    hany help?

    Use copy value function available in Constants category.

  • Mapping complete input XML structure into one field on target

    Hi,
    I have a scenario where I need to map the complete input XML structure as it is, into one field on target side. so can we achieve this in Graphical Mapping? If yes, please share your valuable info.
    Regards,
    Shiva.

    Hello,
    this is the java map code.just compile it and made a .zip file import it and use it Interface Mapping.
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.Map;
    import java.io.*;
    public class PayloadToXMLField1 implements StreamTransformation {
        String strXML = new String();
       //Declare the XML tag for your XML message
       String StartXMLTag = "<DocumentBody>";
       String EndXMLTag = "</DocumentBody>";
       //String StartXMLTag1 = "<Code>";
       //String EndXMLTag1 = "</Code>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = in.read(b)) != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            String outputPayload =
                StartXMLTag
             + "<![CDATA["
             + strXML
             + "]]>"
             + EndXMLTag;
            try {
                out.write(outputPayload.getBytes());
             trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;

  • Seeburger BIC mapping error(on changing mandatory fields)

    Hi Experts,
    I am working on IDOC to EDIFACT file scenario with seeburger.
    Earlier my end to end scenario was working fine. I got a requirement to change all the mandatory fields of segment NAD into non mandatory field. To acheive this i changed my Seeburger BIC mapping and target XSD in PI. After this process i create .sca file and ask basis to upload it.
    But after deployment i am getting error in communication channel where i am using BIC mapping. The error is message is quite big, still i am attaching a part of it. Please help
    Message processing failed. Cause: Error in BICMODULE-module:Temporary error: BIC XI Adapter call failed. Reason: 2 errors occured. First error: BICMapping: runMapping() FATAL ERROR: java.lang.OutOfMemoryError: Java heap space (failed to allocate 16777240 bytes) Stacktrace: java.lang.OutOfMemoryError: Java heap space (failed to allocate 16777240 bytes) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336) at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:395) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:191) at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111) at java.io.BufferedWriter.write(BufferedWriter.java:212) at java.io.Writer.write(Writer.java:126) at com.seeburger.jucon.dochandler.util.GrammarFileWriter.write(GrammarFileWriter.java:262) at com.seeburger.jucon.dochandler.EdiSegmentData.write(EdiSegmentData.java:234) at com.seeburger.jucon.dochandler.Segment.write(Segment.java:645) at com.seeburger.jucon.dochandler.EdiSegmentData.write(EdiSegmentData.java:390) at com.seeburger.jucon.dochandler.Segment.write(Segment.java:645) at com.seeburger.jucon.dochandler.EdiDocWriter.write(EdiDocWriter.java:367) at com.seeburger.jucon.dochandler.InhouseDocWriter.flush(InhouseDocWriter.java:884) at com.seeburger.jucon.mapping.Mapping.run(Mapping.java:2429) at com.seeburger.jucon.seebicapi.BICMapping.runMapping(BICMapping.java:1724) at com.seeburger.jucon.seebicapi.BICMapping.run(BICMapping.java:2518) at com.seeburger.jucon.seebicapi.BICMapping.startSyncMapping(BICMapping.java:1415) at com.seeburger.bicxiadapter.CCIInteraction.convert(CCIInteraction.java:1201) at com.seeburger.bicxiadapter.CCIInteraction.convertCalledFromModule(CCIInteraction.java:911) at com.seeburger.bicxiadapter.CCIInteraction.execute(CCIInteraction.java:313) at com.seeburger.xi.api.cci.impl.nw71.SeeXIInteractionProxy71.execute(SeeXIInteractionProxy71.java:86) at com.seeburger.bicxiadapter.module.CallBicXIRaBean.process(CallBicXIRaBean.java:384) at com.seeburger.xi.api.module.impl.nw71.SeeModuleAdapter71.process(SeeModuleAdapter71.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal
    java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:169) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:266) DESCRIPTION: BICMapping: FATAL ERROR: Internal Fault. Class could not be load or instatiated. Check Installation, access rights. Last error: java.lang.OutOfMemoryError: Java heap space (failed to allocate 16777240 bytes)
    Regards,
    Shradha

    Hi,
    Even I faced a Similar problem...
    1) make sure that the size of the data that is coming to BIC map is not larger than the size defined in the Source field (Check In BIC and SAP XI/PI map.
    2) Make sure id any other seeburger mapping are working fine , This is because you have to deploy the file in form of Active mapping.sca in SAP XI/PI after the changes are made on BIC side.
    3) Check the Adapter Engine Cache ...
    Hope this helps..
    Regards,
    Sainath Chutke

  • The source and target structure have a different number of fields

    Hi,
    I am new to workflow and I am trying to create an attachment in Workflow (SAP ECC 6.0) and pass it through to a User Decision (User Decision works fine) however the workflow is failing on the attachment step with u2018The source and target structure have a different number of fieldsu2019. The bindings check ok. Please see details below.
    I have used document u2018Creating Attachments to Work Items or to User Decisions in Workflowsu2019 by Ramakanth Reddy for guidance. Thanks in advance.
    1) Workflow containers (SWDD)
    WORKITEMID (import)
    ZSWR_ATT_ID (export)
    SOFM (export)
    2) Task Container (PFTC)
    1 Import parameter defined u2013 WORKITEMID (swr_struct-workitemid)
    2 Export parameters defined
    - SOFM (Ref. obj. type SOFM)
    - ZSWR_ATT_ID  (swr_att_id-doc_id)
    Binding task -> Method
    Binding for 1 parameter (import) defined
    Task <- Method
    Binding for 2 parameters (export) defined
    3) Z  BOR object created with a Method, Method Parameters and Event (SWO1)
    1 import parameter defined
    2 export parameters defined
    Method calls FM SSF_FUNCTION_MODULE_NAME, CONVERT_OTF, SCMS_XSTRING_TO_BINARY and SAP_WAPI_ATTACHMENT_ADD
    Workflow is triggered by FM SAP_WAPI_CREATE_EVENT, Return_code = 0
    Event_id = 00000000000000000001
    Test results
    A) Triggered by ABAP/ FM SAP_WAPI_CREATE_EVENT - SWI2_DIAG results
    Work item  14791: object <z bor object name> method <method name> cannot be executed. The source and target structure have a different number of fields (this message is repeated 3 times). Error handling for work item 14791. No errors occurred -> details in long text (message is repeated 3 times).
    Message no. WL821, OL383, WL050 in long text
    B) Z BOR Test method <execute>
    Enter workitem id.
    Runtime error - Data objects in Unicode programs cannot be converted. The statement "MOVE src TO dst" requires that the operands "dst" and "src" are convertible. Since this statement is in a Unicode program, the special conversion rules for Unicode programs apply.                                        
    In this case, these rules were violated.   
    Program                             SAPLSWCD                
    Include                                LSWCDF00                
    Row                                    475                     
    Module type                        (FORM)                  
    Module Name                      MOVE_CONTAINER_TO_VALUE           
    C) Z BOR Test method <debugging>
    Enter workitem id.
    SAP_WAPI_ATTACHMENT_ADD, return_code = 0, message_lines  = Attachment created            
    both  swc_set_element container work ok
    Runtime error occurs after end_method executed. Data objects in Unicode programs cannot be converted.
    D) Workflow test
    Enter workitem id <execute>
    Task started> Workflow log> Status = Error
    Workflow errors in Attachment step (however Office document can be viewed in details for step).

    Problem has now been resolved. Problem was related to use of swr_att_id structure and swc_set_element statement in BOR program - problem resolved by only setting w/f container to swr_att_id-doc_id.

  • In XI Mapping multiple fields mapping to single target field.

    Hi Friends,
    In XI Mapping multiple fields mapping to single target field.
    For example my requirement is :
    Source Fields:(This RFC BAPI Structure)
    Empno                0-1
    EmpName           0-1
    Address             0-1
    Taget Field is:
    Details               0-1
    The above three fields passed to the Details Field. Here i am using Concat function
    But i have one query on that on,Every field having "line Break" required.
    Can you please help me out above this requirement.
    Thanks in Advance,
    Sateesh N.

    If you want a line break between the three fields, then try
    passing a,b,c to the udf and in the udf you would have
    return a+"\n"+b+"\n"+c;

  • 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

  • Mapping JDBC lookup: Passing values to multiple fields at target

    Hi all
    i my scenario  i am using mapping JDBC lookup ,and it is working sucessfully.
    but i need to select 4 fields from lookups select query and passing it to 3 different target field at target MT.
    if i use Global container object methods,than only 1 field i can store inglobal container variable..
    and return it 1 the target fields...
    BUT how do i pass 4 fields ,result of the select query to 4 different fields at target MT..
    query :"
    Select BPNO,emp,BENR,bacepack from Ztable where BPNO='"+BPNO[0]+"'";
    Regards
    AjayP

    Hi,
    I have to fetch 3 values and populate it to the 3 fields in the target. The UDF am using is as attached. This UDF is for fetching one value. Kindly tell me about the changes I will have to make to fetch 3 values instead of 1 value.
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;               
    DataBaseResult resultSet = null;                
    // Query to retrieve the PROP value for the particular source value passed.
    Query ="Select PROP from TANKS where ID='" + ID[0] + "' ";
    try{
    //Determine a channel, as created in the Configuration
    channel = LookupService.getChannel("<Business Service>","<Communication Channel>");
    //Get a system accessor for the channel. As the call is being made to an DB, an DatabaseAccessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    //Execute Query and get the values in resultset
    resultSet = accessor.execute(Query);
    for(Iterator rows = resultSet.getRows();rows.hasNext();){
    Map rowMap = (Map)rows.next();                      
    result.addValue((String)rowMap.get("PROP"));       
    catch(Exception ex){
    result.addValue(ex.getMessage());
    finally{
    try{
    if (accessor!=null) accessor.close();
    catch(Exception e){
    result.addValue(e.getMessage());

Maybe you are looking for

  • Animated Gif's Playing too slow

    Lately since I installed leopard animated gif's are showing up on safari too slow and its not on one site its everywhere! And I need to see the real speed of what the gif is or else I won't know if its wrong or not. So what do I do?

  • Insert statement will not work if select statement has less number of colum

    Hi, One of my thread is already resolved on the following URL : unable to insert rows into the table DROP TABLE TEMP; CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2; DECLARE S VARCHAR2(200); STMT VARCHAR2(500); begin for C in (select TABLE_NAM

  • Buying ALL songs from Wish List

    There used to be a button on the Wish List page to buy all the songs from your Wish List but now with the latest upgrade, it's no longer there. Is there a new way to buy ALL the songs from your wish list? I have 14 songs and I don't want to buy each

  • Producer/ Consumer Design error?

    I am learning labview as I go and little errors keep stumping me. I set up the producer/consumer design and it reads the two while loops like I want. However, when I stop the program to save it to the write to measure it gives me an error saying inva

  • Icons keep moving to the upper right corner - a Finder relaunch fixes it but only for a short while

    I'm having an issue that really irks me and it's very frustrating.  Whenever I open certain programs (ie. iPhoto, Pixelmator, Safari (sometimes)) and I click to the desktop to either drag a file in or drag one out to the desktop, all the icons start