cancel
Showing results for 
Search instead for 
Did you mean: 

WD4A Dynamic programming

AlexGiguere
Contributor
0 Kudos

In my web dynpro application, I'm using 2 ALV components usage.

1 to display a list of articles according to the selection-criteria.

1 to display the quota scale of the selected article of the first ALV.

I could seperate the logic in different WD components for better reusability, but let's say for now everything is in one WD component.

The second ALV (quota scale) will be editable. The user can change the qty and I have to save this data to my context for eventual posting. The quota scale here represent how many articles should we received in a prepack by color and size.

COLOR/SIZE XXL XL L M SL

BLACK 1 2 2 1 1

RED 1 1 1 1 1

WHITE 1 3 3 4 4

Now I must create my context, I will have a node ARTICLES(O:N) for the first ALV and a second node QUOTA_SCALE(O:N)

Displaying the table as COLOR SIZE QTY will be much easier. But I want to represent it as a matrix.

Here is my problem:

Depending on which article you select, the size could change, so it means the columns for sizes will have to be created dynamically.

Solutions:

When an article is selected, I retrieved the quota scale in and internal table (color size qty).

After I will have to create the context dynamically ??? and represent the data as a matrix......

Do you have any idea about how can I handle that??

Thanks

Alex

Accepted Solutions (0)

Answers (1)

Answers (1)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Have a look at how Mr. Jung is doing it in his SE16 emulator.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf20e84f-0901-0010-fe9e-91d10001...

Regards,

Rich Heilman

AlexGiguere
Contributor
0 Kudos

The ALV component context data node can only be map to a node that contains only attributes, no sub-node.

So I can't create a dynamic sub-node (quota_scale) under my context node articles.

I will create another context node (articles_quota) as a main node.

After populating the first context node articles, I will populate the second context node (articles_quota), this context node will only contains the articles number and a sub-node that will be created dynamically for the quota scale.

Now, If a user select an article from the first ALV, I will have to find this article in the other context node where I will build my sub-node quota-scale, then this sub-node will be bind to the second alv component usage dynamically,

what do you think?

I have to find a way of cross-referencing from my first context (articles) to another context (articles_quota)??

Alex