on 01-12-2007 3:55 PM
I have 3 dropdownfields (a,b,c) but all these field are filled with the same outputfield of the Bapi, but don't need to have the same values. How can I solve this?
Hi,
Shoud you read the Bapi result and fill every one dropdown field with the right values. Each dropdown field will bind its attribute context and you will populate individually.
IModifiableSimpleValueSet valueSet_A = wdThis.wdGetController().wdGetContext().getContext().getModifiableTypeOf("Node.AttributeA").getSVServices().getModifiableSimpleValueSet();
// read the bapi result and fill following the specification to each field ...
valueSet.put(key, value);
...
IModifiableSimpleValueSet valueSet_B = wdThis.wdGetController().wdGetContext().getContext().getModifiableTypeOf("Node.AttributeB").getSVServices().getModifiableSimpleValueSet();
// read the bapi result and fill following the specification to each field ...
valueSet.put(key, value);
...
Regards,
Luciano
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dresen,
Yes, you should bind all attributes with this code. At this case, these attributes are created at the Component Controller.
So, you have tree dropdows and tree attributes. Your code will read the content at the bapi return and set at these attributes. In your view, bind each attribute value with each dropdow.
Regards,
Luciano
what do you mean then with key and value?
<code>
IModifiableSimpleValueSet valueSet_A = wdThis.wdGetUWL_Form_CustController().wdGetContext().getContext().getModifiableTypeOf("PersonalData.P0002_NATIO").getSVServices().getModifiableSimpleValueSet();
// read the bapi result and fill following the specification to each field ...
valueSet_A.put(key, wdThis.wdGetContext().currentCountriesElement().getNatio());
IModifiableSimpleValueSet valueSet_B = wdThis.wdGetUWL_Form_CustController().wdGetContext().getContext().getModifiableTypeOf("PersonalData.P0002_NATI1").getSVServices().getModifiableSimpleValueSet();
// read the bapi result and fill following the specification to each field ...
valueSet_B.put(key, wdThis.wdGetContext().currentCountriesElement().getNatio);
IModifiableSimpleValueSet valueSet_c = wdThis.wdGetUWL_Form_CustController().wdGetContext().getContext().getModifiableTypeOf("PersonalData.P0002_NATI2").getSVServices().getModifiableSimpleValueSet();
// read the bapi result and fill following the specification to each field ...
valueSet_c.put(key, wdThis.wdGetContext().currentCountriesElement().getNatio);
<code>
Hallo Sven,
to propse the best solution for your problem it would be helpful to get a more detailed description of your application scenario?
- What's meant with "3 fields are filled with the same outputfield of the BAPI"? Some exectuable Adaptive RFC model object returns a list of displaytexts? What's the output? A list of values?
- Dropdownfields are normally bound to a context attribtue of type "Adaptive RFC Logical Dictionary Simple Type". Is there any such Simple Type envolved? If you have such a Simple Type you can just define three context value attributes of this type without creating three modifiable simple types.
- What happens after selecting one of the 3 dropdownfields. I assume that you must send this data back to the SAP system using another RFC.
Regards, Bertram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well 3 value attributes A, B, C (type string) which are connected to dropdown by key.
One bapi with output nationality.
The dropdown is filled by an other bapi (table dump) what I want to create is when the table dumb bapi is empty for these attributes. then these attributes (A,B,C) should be filled with the bapi with output nationality.
Hi,
Which one u using: Dropdown by Key or Index?
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dresen,
Inorder to make the value attributes flexible, u have to define the value attributes inside wdDoModifyView().
For example, to create a value attribute of type string at runtime to the context,
IWDNodeInfo TableNodeInfo=wdContext.getNodeInfo).addAttribute (<attributename> , "ddic:com.sap.dictionary.string")
To create a value attribute of type int at runtime to the context,
IWDNodeInfo TableNodeInfo=wdContext.getNodeInfo).addAttribute(<attributename>, "ddic:com.sap.dictionary.integer");
Regards
Fahad Hamsa
Try to set attribute 'singleton' to false for node which you mapped on drop down control.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.