on 01-08-2008 5:16 PM
Hi Experts,
I have a table that contains material numbers and messages.
When the user selects ' n' number of material numbers using a check box, and click on Edit, it should take the selected material numbers and call the transaction iview passing all these parameters.
My T-Code accepts multiple parameters through an input box.
Pl find my code for getting the values from table.
public void onActionEdit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionEdit(ServerEvent)
MATNR="+wdContext.currentContextElement().getSuccessMatNumber());
for(int i=0;i<wdContext.nodeSuccessNode().size();i++)
{
if(wdContext.nodeSuccessNode().getSuccessNodeElementAt(i).getChkBox()==true)
{
//What should I do here with the selected values??
}
}
Thanks
Anjana
Hi Anjana,
If I have understood correctly, " T-Code accepts multiple parameters through an input box" .....T-code is R/3 transaction.
You can't interact with T-code directly, instead of that wrap t-code in custom rfc and call it and you will be able to pass parameters as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gangadharayya,
Usually we can pass single parameter to tcode using transaction iview and can pass parameter like this
WDPortalNavigation.navigateAbsolute(
"ROLES://portal_content/myIview",
WDPortalNavigationMode.SHOW_INPLACE,
"width=300,height=200,location",
(String) null,
WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
(String) null,
(String) null,
"S_ABC=" + myVariable );
Now, my requirement is similar to this.I have a table with two columns(for eg.country and checkbox). When the user selects multiple rows using the checkbox, i need to call the transaction iview passing those selected 'country' values.
Thanks
Anjana
Hi,
Since you know how to pass parameter to tcode, then I assume that you wanted to know what code should be put at commented line
wdContext.nodeSuccessNode().moveFirst();
"if(wdContext.nodeSuccessNode().getSuccessNodeElementAt(i).getChkBox()==true)
{
//What should I do here with the selected values??
Here you take selected value as follows:String strValue = wdContext.currentSuccessNodeElement.get....();
And pass it to tcode
Then move to next line
wdContext.nodeSuccessNode().moveNext();
}
"
Hi ,
Since we cannot pass a table while calling transaction iView,my T-Code is modified to accept multiple values in one input field itslf separated my comma.
So from my table how can I call the transaction iView passing the selected 'material numbers' .
The number of selected material numbers can vary from one to 25.
Thanks
Anjana.
Miss Anjana,
String materialNo = null;
if(// check box is selected){
if(materialNo == null){
materialNo = wdContext().////get Material number
}else{
materialNo = materialNo","wdContext().////get Material number
}
//print values before sending it to the iview.
//passing it to the transaction iview like this
if(materialNo != null){
WDPortalNavigation.navigateAbsolute(PageURL, WDPortalNavigationMode.SHOW_EXTERNAL, WDPortalNavigationHistoryMode.NO_DUPLICATIONS,"RMMG1-MATNR="+materialNo);
Regards,
Sridhar
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.