RFC:Complex structure

Dear experts,
In my PI box,i used one RFC SXMB_GET_MESSAGES.I provided input to the table parameter with over 155 values.
My attempt was to retrieve from output table parameter which is a deep structure
If i drill EX_MSG_CONTENT , i get table MSG_VERS_T as one of table output and on further drilling this i get PROP again of type table line.
<table>EX_MSG_CONTENT_LIST -> <table> MSG_VERS_T ->  <table> PROP
Ultimately i fetched two fields from table PROP.Only issue is that if i am providing 155 input values i get 36 output values only.
Further incase i put 222 input values then output values get affected in same ration ex 56 output values and so on..
What should  i conclude.IS this because RFC (Remote Enabled) doesnot support complex nested structures and i should give up this assignment or may be i need to put something in addition. ?.For those of you familiar with java i am trying something like this
_ob_c.function.execute(ob_c.destination);    //Problematic as it return less number of rows_
call function statement:
ArrayList<PayLoadType> payloads  = new ArrayList<PayLoadType>(fetchmessagepayloads(tableresout)); 
//Works well as content fetched is actually equal to number of records fetched above.
public ArrayList<PayLoadType> fetchmessagepayloads (JCoTable tableobj)
int count = 0;
ArrayList<PayLoadType> oba = new ArrayList<PayLoadType> ();
while (count < tableobj.getNumRows()) {
PayLoadType obj = new PayLoadType();
JCoTable subtab1  = tableobj.getTable("MSG_VERS_T");
count = count + 1;
int rec = subtab1.getNumRows();
int numrecs = 0;
while ( numrecs < rec )
subtab1.nextRow();
numrecs = numrecs + 1;
JCoTable subtab2  = subtab1.getTable("TPROP");
numrecs = 0;
rec = subtab2.getNumRows();
while (numrecs < rec )
numrecs = numrecs + 1;
if (subtab2.getString("LCNAME").trim().equals("Main")) {
obj.msgid = subtab2.getString("MSGGUID");
obj.payload = subtab2.getString("CONTENT");
oba.add(obj);
subtab2.nextRow();
tableobj.nextRow();
return oba;
Edited by: aditya  sharma on Aug 16, 2010 10:20 AM

Hi,
The problem is basically in message mapping from file to RFC external message.
The option 2 is working now and I get correct converted file strcuture after FCC and into RFC and also a correct RFC payload.
However, business is stressing that can send the file in the format as given in Option 1 where u have different structure - Header and Items. This is not coming out correct in RFC payload as the header has 5 fields as compared to more in item but the header and item are still being mapped to the flat RFC structure and this is creating a mismatch. The item line is missing the 5 fields from Header.
How do i do the FCC in this situation to get the correct structure in RFC?
This means that in RFC payload, the first line should be the one as below-
H,100890,P100,A02,S101,AUD#
The 2 records after this as received in RFC internal table should be as 2 given below-
I,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
I,P,NULL,TH,Test PO TH1 2,2,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
However, the 2 structures contain variable field columns.
Please help.
Regards,
Archana

Similar Messages

  • Mapping of complex structure in XI

    Hi friends,
    I have a RFC to SOAP scenario in XI. As a response message they have given a structure with single field in it. But when it is coming over, it has a complex structure, I need to break it to different fields in my internal table. The response I have is given below.
    <Result><Response><FileID _Inserted="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">1992143</FileID><AuthID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="i4">195894</AuthID><MessageList _Inserted="1"><Message _Inserted="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">Domain value is invalid for field FilePriority (Client Name), Priority Type (Cartus Name) . The value received was SFNR.</Message><Message _Inserted="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">The Destination Location State/Province is invalid. The State/Province was deleted and appended to City/Town. The value was Chennai.</Message><Message _Inserted="1" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">Received Authorized Initiator (Nambissan, Rajesh) is not an active contact for client/division, Default Initiator was used.</Message></MessageList></Response></Result>
    From this I need to seperate the fileid, authid, messages seperately. Can anyone please suggest how I can do that.
    Thanks in advance for your help.
    Anjana.

    Hi,
    I created a .xsl file using Altova MapForce with the result xml I got from the other system and xml created from my RFC.
    I created a zip file using that .xsl and imported it in archives, and used it in Interface mapping. Now, it is not giving me any error but the mapping is not happening as I expected. I m getting some weird result.
    The .xsl file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n2="http://tempuri.org/message/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="urn:sap-com:document:sap:rfc:functions" xmlns:dt="urn:schemas-microsoft-com:datatypes" exclude-result-prefixes="dt n2 xs xsi xsl" xmlns="urn:sap-com:document:sap:rfc:functions">
         <xsl:namespace-alias stylesheet-prefix="n" result-prefix="#default"/>
         <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
         <xsl:template match="/">
              <ns1:Z_PA_SAP_TO_CENDANT.Response>
                   <xsl:attribute name="xsi:schemaLocation">
                        <xsl:value-of select="'urn:sap-com:document:sap:rfc:functions C:/DOCUME~1/asankara/Desktop/Z_PA_SAP_TO_CENDANT.xsd'"/>
                   </xsl:attribute>
                   <xsl:variable name="var1_instance" select="."/>
                   <IT_ERROR>
                        <item><xsl:for-each select="$var1_instance/n2:AuthorizationResponse/Result/Response/MessageList/Message">
                                  <ERROR_DESC>
                                       <xsl:value-of select="string(.)"/>
                                  </ERROR_DESC>
                             </xsl:for-each>                      </item>
                   </IT_ERROR>
                   <IT_RESPONSE>
                        <item>
                             <xsl:for-each select="$var1_instance/n2:AuthorizationResponse">
                                  <FILEID>
                                       <xsl:value-of select="number(string(Result/Response/FileID))"/>
                                  </FILEID>
                             </xsl:for-each>
                             <xsl:for-each select="$var1_instance/n2:AuthorizationResponse">
                                  <AUTHID>
                                       <xsl:value-of select="number(string(Result/Response/AuthID))"/>
                                  </AUTHID>
                             </xsl:for-each>
                        </item>
                   </IT_RESPONSE>
              </ns1:Z_PA_SAP_TO_CENDANT.Response>
         </xsl:template>
    </xsl:stylesheet>
    Should I make any changes in the file that is created in Mapforce?Please help.
    Thanks,
    Anjana.

  • Complex structures in Sender File adapter

    Hi Experts
    I am working on XI 3.0 SP 22. How do we handle the complex structures in sender file adapter in file content conversion.
    Please help me out.
    Regards
    Hari

    Hi,
    FCC can support upto max 3 levels, find below link for more help
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Content Conversion ( The Key Field Problem )

  • Error while creating Complex Structure

    Hi Friends,
         When I am creating a complex structure with KOMG,KONH,KONP,which are related to pricing conditions data.
    But I am getting the error as "<b>Field name 'ZZEMPL1' can already exist in a subsequent system</b>" for some of the customer fields in the KOMG structure.I am unable to understand what is the subsequent system?
    So please help me to solve this issue.
    Regards,
    Anil

    hi guru,
    just component name as --- your field name.
    where as component type as give just data element k.
    no need to give tablenme-fieldname k.
    component         component type .
    f1                        matnr----
    data element
    thanks anji.
    Moderator message: please do not use SMS speak, what does that "k" mean, short for "OK"? please get your act together, these are professional forums.
    Edited by: Thomas Zloch on Nov 15, 2010 9:10 AM

  • Complex structure SPLITING

    HI,
    We are working inbond scenario(FILE to proxy) with split.and sender structure as complex structure.like
    both sender and receiver structure as
    MT_DATATYPE(message type)
    HEADER(H01)----
    This is Header record .It should be come only one for entire record structure.
    RECORD_1(R1)------In each record have some nodes like R11,R12,R13....
    RECORD_2(R2)------In each record have some nodes like R21,R22,R23....
    RECORD_3(R3)
    RECORD_4 (R4)  etc..total 12 records.
    but while we are using multiuple records for testing purpose like as below
    H01,R1,R2,R4,R2,R3,R1,R4............,H01,R2,R4,R3.R4.R1.R3...........H01,R1,R3,R4.....
    so i want record target record structure as 3 set of structure becuase the test file has 3 HO1 nodes.The required target structure should be like this
    MT_DATATYPE1(Message type1)------H01,R1,R2,R4,R2,R3,R1,R4.(REQUIRED STRUCTURE)
    MT_DATATYPE2(Message type2).......H01,R2,R4,R3.R4.R1.R3.(REQUIRED STRUCTURE)
    MT_DATATYPE2(Message type3)............H01,R1,R3,R4.(REQUIRED STRUCTURE)
    Here we have to do some validation in the mapping.so atleast one mappping should be using for validation.while trying to do this validation this mapping it was showing the target structure as
    MT_DATATYPE1(Message type1)------H01,R1,R1,R2,R2,R3,R4,R4.(AS OF NOW WE ARE GETTING error OUTPUT)
    MT_DATATYPE2(Message type2).......H01,R1,R2,R3.R3,R4.R4.(AS OF NOW WE ARE GETTING error OUTPUT)
    MT_DATATYPE2(Message type3)............H01,R1,R3,R4.(AS OF NOW WE ARE GETTING error OUTPUT).
    STEP TO TRIED THIS SOLUTION:
    1.DOM parser(javamapping) also added in this structure but still getting same problem.
    2.In first mapping structure have only using  java mapiing so that  total record divided into 3 different structure like..
    MT_DATATYPE.......
    TOTALRECORD..H01,R1,R2,R4,R2,R3,R1,R4
    ToTALRECORD..,H01,R2,R4,R3.R4.R1.R3
    TOTALRECORD...H01,R1,R3,R4.....
    then the toal strucre send to receiver communication channel for receving entire strcture.Then the same structure will pick sender communication channel using FCC and i am using record strsucture per message as 1.for picking sthe single structure in the entier structuree . but still we are getting some problem.it didnt take entier single structure .It was taking like below structure.
    TOTALRECORD..H01,R1,R2,R4.
    TOTALRECORD..,R2,R3,
    TOTALRECORD..,R1,R4........still problem.
    PLease help me .may be this is high complex issue.
    Thanks
    kumar

    Hi ,
            Is there any condition for mapping the record and header .
    - Muru

  • How to use content conversion for Complex structure

    Hi All,
    I want to know how to use content conversion for the following complex structure:
    Data               
    ...Details            1 to Unbound
    .....Header           1 to 1
    .......HF1
    .......HF2
    .......HF3
    .......ITEM           1 to unbound
    .........ITF1
    .........ITF2
    all are of type string.
    Thanks & Regards,
    Viswanath
    Message was edited by: Viswanath Mente

    Hi,
    In the content conversion,
    give ur
    1.document name as message type
    2.give ur recordstructure as Details,,Header,1,ITEM,
    3.mention ur keyfield.
    conversion parameter
    Header.fieldFixedLength - give the field lengths
    Header.fieldNames=mention all the field name
    Header.keyField=enter the value of keyfield
    Header.endSeparator='nl'
    repeat the same  for Item
    regards
    jithesh

  • Webinvoke put complex structure

    Hi,
    I have the following declaration:
    [OperationContract]
    [WebInvoke(Method = "PUT", UriTemplate = "svcrVCIPutBellImages? images_in={images_in}")]
    String svcrVCIPutBellImages(VCI_Bell_Images[] images_in);
    Where the array is defined as:
    #region VCI_Bell_Images
    [DataContract]
    public class VCI_Bell_Images
    public VCI_Bell_Images()
    this.acsAlarmType = " ";
    this.sImage = null;
    this.acsFileExtension = " ";
    this.acsFileName = " ";
    public VCI_Bell_Images(String acAlarmType, byte[] Image, String FileExtension)
    this.acsAlarmType = acAlarmType;
    this.sImage = Image;
    this.acsFileExtension = FileExtension;
    this.acsFileName = "none";
    public VCI_Bell_Images(String acAlarmType, byte[] Image, String FileName, String FileExtension)
    this.acsAlarmType = acAlarmType;
    this.sImage = Image;
    this.acsFileExtension = FileExtension;
    this.acsFileName = FileName;
    [DataMember]
    public String acAlarmType
    get { return this.acsAlarmType; }
    set { this.acsAlarmType = value; }
    [DataMember]
    public byte[] Image
    get { return this.sImage; }
    set { this.sImage = value; }
    [DataMember]
    public String FileExtension
    get { return this.acsFileExtension; }
    set { this.acsFileExtension = value; }
    [DataMember]
    public String FileName
    get { return this.acsFileName; }
    set { this.acsFileName = value; }
    private String acsAlarmType;
    private byte[] sImage;
    private String acsFileExtension;
    private String acsFileName;
    #endregion
    Everything about this structure is string and byte arrays.
    QueryStringConverter is supposed to handle strings and byte arrays natively.
    But I get the errors:
    Server Error in '/' Application.
    Operation 'svcrVCIPutBellImages' in contract 'IVCIWCFRServices' has a query variable named 'images_in' of type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]', but type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.InvalidOperationException: Operation 'svcrVCIPutBellImages' in contract 'IVCIWCFRServices' has a query variable named 'images_in' of type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]', but type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [InvalidOperationException: Operation 'svcrVCIPutBellImages' in contract 'IVCIWCFRServices' has a query variable named 'images_in' of type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]', but type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'.]
    System.ServiceModel.Dispatcher.UriTemplateClientFormatter.Populate(Dictionary`2& pathMapping, Dictionary`2& queryMapping, Int32& totalNumUTVars, UriTemplate& uriTemplate, OperationDescription operationDescription, QueryStringConverter qsc, String contractName) +1070
    System.ServiceModel.Web.WebServiceHost.IsRawContentMapperCompatibleDispatchOperation(OperationDescription operation, Int32& numStreamOperations) +184
    System.ServiceModel.Web.WebServiceHost.SetRawContentTypeMapperIfNecessary(ServiceEndpoint endpoint, Boolean isDispatch) +244
    System.ServiceModel.Web.WebServiceHost.OnOpening() +434
    System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +265
    System.ServiceModel.Channels.CommunicationObject.Open() +36
    System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +90
    System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +598
    [ServiceActivationException: The service '/VCIWCFRServices' cannot be activated due to an exception during compilation. The exception message is: Operation 'svcrVCIPutBellImages' in contract 'IVCIWCFRServices' has a query variable named 'images_in' of type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]', but type 'VCIWCFRestfulServiceNS.VCI_Bell_Images[]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'..]
    System.Runtime.AsyncResult.End(IAsyncResult result) +485948
    System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +174
    System.ServiceModel.Activation.AspNetRouteServiceHttpHandler.EndProcessRequest(IAsyncResult result) +6
    System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +129
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212
    Ok, what do I have to do?
    Please advise
    Boyd
    But the inverse works fine:
    [OperationContract]
    [WebGet(UriTemplate = "svcrVCIGetBellImages")]
    VCI_Bell_Images[] svcrVCIGetBellImages();
    So I can GET a list of complex structures, but I cannot PUT the same structure!!!
    BDM

    Hi Boyd1,
    In my mind WCF UriTemplate does not support complex objects. So in this case you may need to stick with primary types from .NET. If you still want to use a complex object as parameter to your method, then maybe you need to drop the
    UriTemplate and pass your object using JSON.
    Best Regards,
    Amy Peng
    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.

  • Display a complex structure for edit - BUS_EI_EXTERN

    Good day Everyone
    I need to display a complex structure (BUS_EI_EXTERN) to a user in a BSP and allow the user to change one or more required fields of this structure. I thought about using a recersive algorithm to iterate through the structure and display the table names in a tree. When the user clicks on a node (table) they will get a list of all the attributes of the table which they can edit.
    Would this be the 'easiest' route to go?
    I tried to use LVC_FIELDCATALOG_MERGE to get the attributes of the structure, unfortunantly it flattens the structure, any other way i can try and go through the structure?
    I dont suppose there is a nice function module that already does what i want?
    Thank you for all your help.
    Sincerely,
    Marc

    Hi,
    use function DDIF_FIELDINFO_GET to get the information about any structure/table and in its parameter DFIES_TAB you get the data that you need.
    Later you can build your tree with that data.
    Regards

  • Sender File adapter complex structure FCC issue - flat structure RFC-stuck

    Hi,
    Please help.
    I have a the below file structres-
    Option 1-
    H,100890,P100,A02,S101,AUD#
    I,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    I,P,NULL,TH,Test PO TH1 2,2,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    H,100899,P100,A02,S101,GBP#
    I,P,NULL,AS,Test PO AS1,1,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT#
    I,P,NULL,AS,Test PO AS12,2,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT#
    I need to map this into a Z RFC which is expecting all the data in one row - of course multiple rows
    Option 2-
    Same structure as above but all in same row-
    H,100890,P100,A02,S101,AUD,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    I,100890,P100,A02,S101,AUD,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    I,100890,P100,A02,S101,AUD,P,NULL,TH,Test PO TH1 2,2,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    H,100899,P100,A02,S101,GBP,P,NULL,AS,Test PO AS1,1,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT#
    I,100899,P100,A02,S101,GBP,P,NULL,AS,Test PO AS1,1,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT#
    I,100899,P100,A02,S101,GBP,P,NULL,AS,Test PO AS12,2,EA,100,10160000,A002,0001,720090,E.1.4.2,,,,VT
    This also needs to be mapped into a Z RFC which is expecting all the data in one row - of course multiple rows
    I am getting issues in getting the file data across to Receiver adapter.
    I have tried various combinations but the message is failing in SXMB_MONI.
    How do i do it as i need to get the finalised option for incoming file structure?
    Option 1 is being stressed but how do i map it if i cannot get the receiver structure in RFC.
    Please help as I am stuck now.
    Regards,
    Archana

    Hi,
    The problem is basically in message mapping from file to RFC external message.
    The option 2 is working now and I get correct converted file strcuture after FCC and into RFC and also a correct RFC payload.
    However, business is stressing that can send the file in the format as given in Option 1 where u have different structure - Header and Items. This is not coming out correct in RFC payload as the header has 5 fields as compared to more in item but the header and item are still being mapped to the flat RFC structure and this is creating a mismatch. The item line is missing the 5 fields from Header.
    How do i do the FCC in this situation to get the correct structure in RFC?
    This means that in RFC payload, the first line should be the one as below-
    H,100890,P100,A02,S101,AUD#
    The 2 records after this as received in RFC internal table should be as 2 given below-
    I,P,NULL,TH,Test PO TH,1,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    I,P,NULL,TH,Test PO TH1 2,2,EA,100,10160000,A002,0001,720090,E.1.4.3,,,,VT#
    However, the 2 structures contain variable field columns.
    Please help.
    Regards,
    Archana

  • Passing values to RFC holding structure.

    Hi Experts,
    I have DC which needs to update backend table through RFC.  In this RFC i have a structure in import tab which holds 2 fields.
    From webDynpro Java code , i have to pass the those 2 fields as input before when i execute the model.
    How can i write code for inputing the values for this structure fields ?
    thanks in advance.
    Regards,
    suresh

    Hi Suresh,
    Steps to execute you Adaptive RFC Model:
    1. Create an instance of the BAPI's input structure-
    <Your BAPI Name>_Input input = new  <Your BAPI Name>_Input();
    2. Set the two input parameters to this input structure with desired parameter values-
    input.set<Your Para 1>(<Desired Parameter Value>);
    input.set<Your Para 2>(<Desired Parameter Value>);
    3. Create and Bind a model node in context to the input structural node of Your BAPI using model binding. Now using code bind the instance of the input structute to the model nodel in conext as stated below-
    wdConext.node<Your Custom created Model Node in Context>().bind(input);
    4. Execute the model and invalidate the output node-
    try{
                   wdContext.current<Your Model Node in Conext>().modelObject().execute();
                    wdConext.node<Output Node in the conext>().invalidate();
    }catch(Exception){
    5. Pick all the output parameters from the Output Node in the context.
    Hope it helps!!
    Regards,
    Tushar S

  • OLD RFC export structure being referred to

    Hello all,
    I am testing a XI to RFC call in PI. The structure of the export parameter was changed after being imported into IR and accordingly I did re-import the modified RFC into IR. The export parameter in IR reflects the latest correct structure. Whereas when I test my scenario, the interface is failing because the response from the RFC is still referring to the old export parameter structure and not the new one.
    In fact the response XML has the old RFC export parameter and hence its failing in mapping runtime because its unable to generate the newer version of the export parameter as expected by IR.
    *This is the error i am getting.
    RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:Vista_MR2A_Response_MT/Rows/RECORD_ID. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start*
    Can anyone please help on how to solve this problem.
    Cheers,
    Babs

    Hi,
    you also need to refresh RFC cache (by restarting RFC adapter service in visual admin for example)
    or by restarting java stack if this will be faster in your case
    Regards,
    Michal Krawczyk

  • RFC input structure

    Hello,
    I am trying to call a RFC from my WebDynpro application.
    The RFC has a mandatory input structure called PERSDATA.
    I am using the following test code to call the RFC:
         IWDMessageManager manager = wdComponentAPI.getMessageManager();
         try{
              wdContext.nodeZ_Portal_Get_Timesheet_Input().bind(new Z_Portal_Get_Timesheet_Input());
              wdContext.currentZ_Portal_Get_Timesheet_InputElement().setKeydate(new Date(105,9,27));
              wdContext.nodePersdata().bind(new Cats_Its_Persdata());
              wdContext.currentPersdataElement().setPernr("00003000");
              wdContext.currentZ_Portal_Get_Timesheet_InputElement().modelObject().execute();
              wdContext.nodeOutput().invalidate();
         } catch(WDDynamicRFCExecuteException ce) {
              manager.reportException(ce.getMessage(), false);
    When I run this code I get the errormessage:
    <b>Mandatory parameter PERSDATA of method Z_PORTAL_GET_TIMESHEET missing.</b>
    When I display the input structure in my view (in a table) it displays one row with pernr set to 00003000 (so it seems to me that the input structure is ok).
    What am I doing wrong here?

    Hallo Johan,
    your mistake is based on the fakt, that you did not correctly aggregate your model object graph. Instead you operated on the context itself. The context only references the model objects within the model object graph. Relations between context nodes and context node elements are not automatcally mirrored within the model object graph. Principally you have to aggregate your model object graph first (independant from the contex) and afterwards you can reference the executable model class within the toplevel context node element.
    I assume, that your code should look like this:
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
    try {
      // Aggregate model object graph
      Z_Portal_Get_Timesheet_Input timeSheetInput =
      new Z_Portal_Get_Timesheet_Input();
      timeSheetInput.setKeydate(new Date(105, 9, 27));
      Cats_Its_Persdata persData = new Cats_Its_Persdata();
      persData.setPernr("00003000");
      timeSheetInput.setPersdata(persData);
      // Bind executable model object to context node 'Z_Portal_Get_Timesheet_Input'
      wdContext.nodeZ_Portal_Get_Timesheet_Input().bind(timeSheetInput);
      // Execute model object
      wdContext
        .currentZ_Portal_Get_Timesheet_InputElement()
        .modelObject()
        .execute();
      // Invalidate output node so that the context-to-model-object-references will be updated
      wdContext.nodeOutput().invalidate();
    } catch (WDDynamicRFCExecuteException ce) {
    manager.reportException(ce.getMessage(), false);
    Also have a look at my related answer within the forum thread Executing model : deep structure in importing parameter of RFC which deals with the same issue.
    Regards, Bertram
    Regards, Bertram

  • Getting RFC  response structure in XI

    All,
    I have a scanario like this,RFC>XI->file where i have to map RFC response to file.I have gone throungh some blogs for this.
    I am using RFC sender adapter.
    In my message mapping i have mapped RFC response to file structure and in my IM i have used RFC as sender interface.
    Is it fine?

    If your scenario is RFC - XI - File it is not the RFC responce but it is async RFC call.
    You call it RFC scenario when the scenario is
    send sys --- XI ----File
                      | |
                     RFC
    For a overview scenario of this scenario and structure creation have a look at my blog Impede Duplicate Files
    >>I am wonder how do we get RFC response from R3
    Both the Blogs that I replied has the sample ABAP code that is used to send the RFC message to XI.
    You can use the imported RFC in both the Message Mapping and the Interface Mapping
    Thanks
    SaNv...

  • Passing values to a RFC table structure

    Hi
        I am using an RFC in which there is a table called Submit Details.I want to pass three rows to this table structure in the R/3 system.
                            Can anyone help me how to do this.
    regards
    Nayeem

    Hi,
    Private<name>View.I<value node name >Node node = wdContext.node<value node name >();
    Private<name>View.I<value node name>Element ele;
    <your rfc name> input = new <your rfc name>(); // your rfc name
    wdContext.node<your rfc name>().bind(input); // bind
    <table name> inputTable;
    for (int i=0; i < node.size(); i++ ) // value node - where data is available
    inputTable= new <table name>();
    ele = node.get<value node>ElementAt(i);
    inputTable.set<Attribute>(ele.get<Attribute>());
    input.add<table name>();
    // execute rfc.

  • RFC Model Structure BAPI_SALESORDER_CREATEFROMDAT2

    Hello Forum,
    i need help concerning Web Dynpro Java, i think i have a comprehension problem:
    When i import the Bapi_Salesorder_Getlist as Adaptive RFC, Map the Model to the context via Apply Template (Service Controller), Apply Template into the View and create a InputForm (Values are of InputField-Type), Button and an Output-Table (TextViews), i'm able to Deploy the Project and use the Input Fields CustomerNumber and Salesorganization to generate the wanted Results.
    If i to the same with Bapi_Salesorder_Createfromdat2 it doesn't work. What i can do is to hard-code the Entries for OrderHeaderIn etc., but i cannot use the Input Filds because they're blanked out.
    See this posting -> Creating Salesorder via Bapi_Salesorder_Createfromdat2
    I think this is because of the imported Model-Structure. When i test the Bapis i can directly enter the Test-Data, in Salesorder_Createfromdat2 there are underlying Structures like OrderHeaderIn.
    Do i have to manually create Sub-Model Nodes or something like that? How am i getting theese Structures filled? Could it be another Problem perhaps with the Apply-Template mechanism?
    Any help is appreciated!
    Regards

    Hi Stefan,
    Applying template mechanicanism could nor be the problem.
    You have to create the Object for the corresponding context values classes
    and set them to the corresponding attrributes.
    Bapi_Material_SaveData_Input input = new Bapi_Material_SaveData_Input ();
    wdcontext.nodeBapi_Material_SaveData_Input.bind(input);
    input.setMaterial(obj);  //Object ofcorresponding field
    (Or)
    You have to set some default values for those fields.
    Eg:
    Bapi_Material_SaveData_Input input = new Bapi_Material_SaveData_Input ();
    wdcontext.nodeBapi_Material_SaveData_Input.bind(input);
    input.setMaterial("");  //empty Values
    Regards,
    Ramganesan K.

Maybe you are looking for

  • Runtime Error while loading Flat file in to ODS

    Hi Friends, I have 11 records in flatfile and I am loading it from PC. when I see in preview I can see. But when I load it ,it gives me short dump. request status is in amber.. Please help me as this is urgent support issue. The ABAP Runtime Error is

  • SVG enhancements?

    It would be great if circles and rectangles maintained their respective element types instead of everything becoming a path. More optimized that way. Remove the unnecessary line breaks on path data. It doesn't flow properly when loaded into a text ed

  • Copy and paste a file please help.

    i want to copy and paste a file to a different directory. if i use the .renameTo() it cut and paste the file. what is the right method? killuasoft

  • Wire bracket in iBookG4 - can't clip in airport extreme card

    The airport extreme card is installed and works but I can't put back the keyboard because i can't get the clip to sit back in the slots. Others too have tried. Any ideas please or should I just use pliers? Thanks.

  • IPhoto project disappeared on ipad

    I created a photo book in iPhoto and was preparing to purchase a printed copy when the app auto-updated to a new version and the project disappeared.   There is not even an apparent projects option now, only create and share online journals.   Did th