on 11-03-2014 11:47 AM
Hi Gurus,
I am using a RFC where I need to call data from R/3 with the help of multiple inputs. Our abaper created a RFC, on executing that it is making input fields as readable only. I have checked the cardinality ratio, it is 0:n and it should be 1:1 but it is unchangeable. So please suggest me changes on my side or abap side that I need to make so that it makes the fields writeable for input.
Hi all,
I am executing the rfc in webdynpro java and abap. It is writeable in abap and readable in webdynpro java. The input are tables with multiple input parameters. The functional module is giving correct values on R/3 side.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi mahajan ,
it is input table with multiple values , now tell me how did you bind this to the wdj screen , i mean for entering values we have ot bind the attributes i.e mapping .. have you done this model node binded directly to the view ?
The readonly which you are mentioning im not able to understand. can u please paste a screen shot ?
Regards
Govardan
Hi Govardan,
I have created the model and bind the fields.
in the above screenshot, users will provide the payroll and company code and will click the display button, which in turn execute the rfc and display the data in table.
the above screen shot is taken after executing the application.
thanks and regards
shilpi
hi shilpi ,
here you have binded the model node directly to view , and cardinality as stated earlier is of 0..1 so only here in the screen all input feilds are non editable , firt create a rfc local node , i.e if your rfc is
z_abc_rfc_name ---> Main node
In_dca_node(structure->zadtr)----> sub node
output_node----> sub node
out_dca_node(structure->zbtdr)----> sub node
here z_abc_rfc_name is your rfc with input node as in_dca_node and output node as out_dca_node and now the local rfc node is
Vn_z_abc_rfc_name(cardinality -- 1..1)---> Main node
Chn_In_dca_node(bind the same structure zadtr)(cardinality --1..1)----> sub node
Vn_output_node(cardinality(1..1)----> sub node
Chn_out_dca_node(bind the same structure zbdtr)(cardinality -- 1..1)----> sub node
now while executing the rfc pass the values from the rfc local node the rfc instance and bind the instance to the rfc just execute it
here you can see the model node ending with header for which i have created a local node starting with Vn and ending with BtchHdr etc ... just for an understanding purpose i gave this ,
now which executing the rfc you can use this...
--------------
try
{
//RFC Instance
Request_MIOS_********BatchHeader_MIOS_********BatchHeader MIOS_********BatchHeader;
MIOS_********BatchHeader = new com.****.blkpmtmd.model.batchhdr.Request_MIOS_********BatchHeader_MIOS_********BatchHeader();
//Input node instance
com.****.blkpmtmd.model.batchhdr.ComplexType_DTO_********BatchHeader BatchHeaderInput;
BatchHeaderInput = new com.****.blkpmtmd.model.batchhdr.ComplexType_DTO_********BatchHeader();
BatchHeaderInput.setAccountNumber(wdContext.currentChnMTO_********BtchHdrElement().getAccountNumber());
BatchHeaderInput.setAuthType(wdContext.currentChnMTO_********BtchHdrElement().getAuthType());
BatchHeaderInput.setCorpCode(wdContext.currentChnMTO_********BtchHdrElement().getCorpCode());
BatchHeaderInput.setProductType(wdContext.currentChnMTO_********BtchHdrElement().getProductType());
BatchHeaderInput.setUserID(wdContext.currentChnMTO_********BtchHdrElement().getUserID());
MIOS_********BatchHeader.setMTO_********BatchHeader(BatchHeaderInput);
//Bind the instance
wdContext.nodeRequest_MIOS_********BatchHeader_MIOS_********BatchHeader().bind(MIOS_********BatchHeader);
// Execute the instance
wdContext.currentRequest_MIOS_********BatchHeader_MIOS_********BatchHeaderElement().modelObject().execute();
wdContext.nodeResponseBatchHdr().invalidate();
wdContext.nodeChnResultBatchHdr().invalidate();
if(!wdContext.nodeResultBatchHeaderList().isEmpty())
{
// WDCopyService.copyElements(wdContext.nodeResultBatchHeaderList(),wdContext.nodeChnresultBatchHeaderList());
IPublicFcBulk****ModuleComp.IChnresultBatchHeaderListElement headerListElement;
for(int count = 0 ; count < wdContext.nodeResultBatchHeaderList().size();count++)
{
headerListElement = wdContext.createChnresultBatchHeaderListElement();
headerListElement.setAmountInBucket(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getAmountInBucket());
headerListElement.setAuthorized(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getAuthorized());
headerListElement.setAuthorizedAmount(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getAuthorizedAmount());
headerListElement.setBankBatchNo(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getBankBatchNo());
headerListElement.set****BatchNo(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).get****BatchNo());
headerListElement.setInitiationTime(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getInitiationTime());
headerListElement.setInitiatorID(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getInitiatorID());
headerListElement.setBankRejectedAmount(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getBankRejectedAmount());
headerListElement.setBankRejectedTransactions(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getBankRejectedTransactions());
headerListElement.setUserRejectedAmount(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getUserRejectedAmount());
headerListElement.setUserRejectedTransactions(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getUserRejectedTransactions());
headerListElement.setTotalAmount(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getTotalAmount());
headerListElement.setTotalTransactions(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getTotalTransactions());
headerListElement.setTransactionsInBucket(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getTransactionsInBucket());
headerListElement.setUnAuthorized(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getUnAuthorized());
headerListElement.setUnAuthorizedAmount(wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getUnAuthorizedAmount());
headerListElement.setRemarks("");
wdContext.nodeChnresultBatchHeaderList().addElement(headerListElement);
// wdComponentAPI.getMessageManager().reportSuccess("value from wsld file"+wdContext.nodeResultBatchHeaderList().getResultBatchHeaderListElementAt(count).getUserRejectedTransactions());
}
}else
{
wdComponentAPI.getMessageManager().reportException("No Transactions available for Authorization. ",true);
//wdThis.wdGet****UtilsCompInstInterface().getMessageWindow();
}
if(wdContext.currentResultBatchHdrElement().getAuthMode()!=null)
{
wdContext.currentChnResultBatchHdrElement().setAuthMode(wdContext.currentResultBatchHdrElement().getAuthMode());
}
}catch(Exception e)
{
handleException(e,"Error in Batch List");
}
Regards
Govardan Raj S
hi shilpi,
what u want to tel is your feilds ie input in the wdj screen are readonly mode , etc ? did you directly map the model node to the view ? in that case i dont think it is possible because the cardinality at abap side for these nodes would be maintained as 0..1 ,
but there is one solution what you can do is , for rfc node with input as
abc_input ... create an element of that inptu node and add it to the rfc intially when the application is loading , or else create a local node that is replica of the abap node and then while executing the rfc copy the values from local node to the abap rfc instance and execute the rfc..
Regards
GOvardan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you test the RFC directly in your ABAP system via transaction SE37?
I'm not sure what you mean by " on executing that it is making input fields as readable only" - where are you executing and what are you executing?
Cardinality of 1:1 means the input is obligatory - is this what you want? Are the inputs single fields or tables?
Cheers,
G.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shilpi,
So when you run the RFC in SE37, are the input fields single parameters or structures or tables? Can you paste the top of the RFC definition into this thread so we all understand exactly how it is defined? Like this:-
FUNCTION BAPI_SALESORDER_CREATEFROMDAT2.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(SALESDOCUMENTIN) LIKE BAPIVBELN-VBELN OPTIONAL
*" VALUE(ORDER_HEADER_IN) LIKE BAPISDHD1 STRUCTURE BAPISDHD1
*" VALUE(ORDER_HEADER_INX) LIKE BAPISDHD1X STRUCTURE BAPISDHD1X
*" OPTIONAL
*" VALUE(SENDER) LIKE BAPI_SENDER STRUCTURE BAPI_SENDER OPTIONAL
*" VALUE(BINARY_RELATIONSHIPTYPE) LIKE BAPIRELTYPE-RELTYPE
*" OPTIONAL
*" VALUE(INT_NUMBER_ASSIGNMENT) LIKE BAPIFLAG-BAPIFLAG OPTIONAL
*" VALUE(BEHAVE_WHEN_ERROR) LIKE BAPIFLAG-BAPIFLAG OPTIONAL
*" VALUE(LOGIC_SWITCH) LIKE BAPISDLS STRUCTURE BAPISDLS OPTIONAL
*" VALUE(TESTRUN) LIKE BAPIFLAG-BAPIFLAG OPTIONAL
*" VALUE(CONVERT) LIKE BAPIFLAG-BAPIFLAG DEFAULT SPACE
*" EXPORTING
*" VALUE(SALESDOCUMENT) LIKE BAPIVBELN-VBELN
*" TABLES
*" RETURN STRUCTURE BAPIRET2 OPTIONAL
*" ORDER_ITEMS_IN STRUCTURE BAPISDITM OPTIONAL
*" ORDER_ITEMS_INX STRUCTURE BAPISDITMX OPTIONAL
*" ORDER_PARTNERS STRUCTURE BAPIPARNR
*" ORDER_SCHEDULES_IN STRUCTURE BAPISCHDL OPTIONAL
*" ORDER_SCHEDULES_INX STRUCTURE BAPISCHDLX OPTIONAL
*" ORDER_CONDITIONS_IN STRUCTURE BAPICOND OPTIONAL
*" ORDER_CONDITIONS_INX STRUCTURE BAPICONDX OPTIONAL
*" ORDER_CFGS_REF STRUCTURE BAPICUCFG OPTIONAL
*" ORDER_CFGS_INST STRUCTURE BAPICUINS OPTIONAL
*" ORDER_CFGS_PART_OF STRUCTURE BAPICUPRT OPTIONAL
*" ORDER_CFGS_VALUE STRUCTURE BAPICUVAL OPTIONAL
*" ORDER_CFGS_BLOB STRUCTURE BAPICUBLB OPTIONAL
*" ORDER_CFGS_VK STRUCTURE BAPICUVK OPTIONAL
*" ORDER_CFGS_REFINST STRUCTURE BAPICUREF OPTIONAL
*" ORDER_CCARD STRUCTURE BAPICCARD OPTIONAL
*" ORDER_TEXT STRUCTURE BAPISDTEXT OPTIONAL
*" ORDER_KEYS STRUCTURE BAPISDKEY OPTIONAL
*" EXTENSIONIN STRUCTURE BAPIPAREX OPTIONAL
*" PARTNERADDRESSES STRUCTURE BAPIADDR1 OPTIONAL
*"----------------------------------------------------------------------
Cheers,
G.
sorry that current cardinality ratio is 0:1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.