cancel
Showing results for 
Search instead for 
Did you mean: 

How To Sort Field order within a WDJ View Form Dynamically

Former Member
0 Kudos

Hi All,

Does anyone have any experience of changing the output order of TextView Fields in a form, as supplied from a connected BAPI model, dynamically under certain circumstances.

We are outputting Address input fields to the View but have been asked that the order is presented differently depending on Country/Company.

For example:

Where Country/Company 1

House Number

Street

City

Country

Post Code

Where Country/Company 2.

Post Code

Country

City

Street

House Number

Anyone know if/how this can be accomplished?

Thanks,

Steve.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Steve,

three way to solve this.

1.make a form

With some labels and inputfields, you can set your label text, and bind your inputfileds to context manually using webdynpro codes according to you condition.

2.make several forms

FORM 1,2,3... (all in one view)

[code]

if (Country/Company 1)

set form1 "visible";

set else none;

else if (Country/Company 2)

set form2 "visible";

set else none;

....

3.make a table

the table has two columns, "attribute", "value".

Whatever "county" "city" "PostCode", add them to the table one by one as you like.

Maybe you need to change the style of the table.

Hope this can help you.

Regards!

Fisher

Answers (3)

Answers (3)

p330068
Active Contributor
0 Kudos

Hi Steve,

Try to use dynmic programming for the screen attribute and manage as per your requriement.

OR play with Visibility. Create two transparent container and add the attributes as want and depend on the 'Country/Company' visible/invisible transparent container.

Hope it will helps

Regards

Arun Jaiswal

former_member214651
Active Contributor
0 Kudos

Hi,

If the BAPI is returning the output in the sorted order, this can be easily achieved. your ABAP er shuld be able to provide you with a sorted output table.

Regards,

Poojith MV

Former Member
0 Kudos

Hi Steve,

Try to use TextView property textDirection and hAlign.

Hope this may help you.

Deepak!!!