cancel
Showing results for 
Search instead for 
Did you mean: 

structure in a table in the context

Former Member
0 Kudos

Hello,

I have a node of type table in the context and it has several attributes. One of the attributes is a structure with fields. When I need to save the records into my table, application does not see the structure, only the attributes.

data: tab_context     TYPE wd_this->elements_tab_employees,
      aux_context     TYPE wd_this->element_tab_employees.

TAB_EMPLOYEES is the table. How come it does not see the structure RECS_0028 within it??

Question 2:

When I feed the table and the structure, how am I going to do this ?? Like this ??

MOVE-CORRESPONDING: PA0028 to aux_context-RECS_0028,
                    PA0001 TO aux_context.

Thanks !!

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>application does not see the structure, only the attributes.

That's correct. The XML construct of the Context doesn't allow for any concepts except nodes, elements and attributes. Therefore you can't have a grouping of attributes within a single node. Therefore the structure is basically droped from the context and its fields expanded into attributes.

>When I feed the table and the structure, how am I going to do this ?? Like this ??

That seems reasonable. I suggest you try it.

Former Member
0 Kudos

Hello Thomas,

this surprises me fully !! I am reading the book "WebDynpro for ABAP" of Ulli Hoffmann and he explains about the construction of the information in the context, especially when he comes to the topics Lead Selection and Singleton. Unfortunately there´s no code in the book for this case.

So I guess that I have no other choice but to move the subnode 1 level higher and make it a direct node hanging from the context, or the other option is to expand the structure of my first table in the context with more fields.

Answers (1)

Answers (1)

gill367
Active Contributor
0 Kudos

framework wont create the attribute for the structure present with in the table.

for that please create one more subnode under the employee table and while creating give this strucure name .

thanks

sarbjeet singh