cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Sub-Location based on Delivery Location

Former Member
0 Kudos

Hi all,

I am displaying Delivery locations in front-end by using RFC. Now I want to dislplay Sub-Location based on the Delivery location.

I dont no how to hold the Delivery Location which will be passed to another RFC as input parameter in order to get the Sub-

Locations.. Can any one help me regarding this please?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I tried it. We have to pass the the Delivery location as a parameter to the BAPI which returns sublocations. We need to the hold the delivery location in a Value Attribut which is under some Value node. The CArdinality property of the Value node should be 1..n and selection Property sholud be 1..1. Thats it..

Former Member
0 Kudos

Hello Pravesh Verma,

I got what u r saying.. But here, I bounded the Drop Down directly to the BAPI output. I dint used any attributes to hold the output of BAPI. This is where I confused.. Am I clear Now?

Regards,

Yugesh.

pravesh_verma
Active Contributor
0 Kudos

Hi Yugesh,

I am confused!!! What do you mean by "I bounded the Drop Down directly to the BAPI output???" .. You cannot bind a value directly to the dropdown. You need to have a attribute. You have to always bind a Dropdown with a "selectedKey" property of the Dropdown.

Please make sure you have done this.

If I have misunderstood your question then please let me know. i hope this help.

Thanks and Regards

Pravesh

Former Member
0 Kudos

Hello pravesh,

I understood the concept. The mistake I did was I binded Bapi Node directly to dropdown. But I dont no how to display the Delivery locations through context attributes. And I am confused where do we link the context attribute to BAPI node.. If u are free then please help me regarding this.

Regards,

Yugesh Adalam

Former Member
0 Kudos

Hi once again,

Did u all understood my question. If not check this. I am able to display the City names in a drop down list.. Now I want to display the Sub-locations in another dropdown list, for the selected City in the first dropdown list. Am I clear now?

pravesh_verma
Active Contributor
0 Kudos

Hi Yugesh,

if you already have a BAPI which can return you the name of the sub location based upon the city selecte then it is very easy to pass the parameter of Country to that BAPI.

Try to use this approach.

1) Get the current selected value from the drop down. You would have definitely got an attribute which you have bounded to the Coyntry dropDown. You can get the current selected value from there and pass that value to the next function to get the sub locations.

Use this code:


// I am assuming that the country attribute is directly under the context node.
String country = wdContext.currentContextElement().getCountry();

// If it is in some other node then use this code
String country = wdContext.current<Node_Name>Element().getCountry();

Now you have the value of the selected country from the drop down. You can pass this value to the BAPI or some function to get the value of teh sub locations.

I hope this solves the issue. Please revert back in case you need any further information on this.

Thanks and Regards.

Pravesh

Former Member
0 Kudos

Hello Pravesh Varma,

I got what u r saying.. But here, I bounded drop down directly to BAPI output.. I dint bounded it to any Value Node or Value Attribute. If I have used Value attributes then I can handle the City Name like what u said.. Am I clear Now?

Thanks and Regards,

Yugesh Adalam

Former Member
0 Kudos

Hello All,

I am waiting for a solution for the above mentioned problem.. Could any one please help me regarding this.. Advance thanks for helping me..

Regards,

Yugesh