Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

move data to structre

Former Member
0 Likes
437

hi,

i wont to now if its better to use regular structre or deep

and how i can use deep right.

eg.



TYPES : BEGIN OF  orgunit_tab1,  "Here it's working well
             plvar TYPE plvar,
             otype TYPE otype,
             objid TYPE objektid,
             begda TYPE hrp1000-begda,
             endda TYPE hrp1000-endda,
       END OF orgunit_tab1.

DATA: orgunit_tab TYPE TABLE OF orgunit_tab1,
      wa_orgunit_tab LIKE LINE OF orgunit_tab.


TYPES : BEGIN OF  orgunit_tab1, 
             org TYPE hrobject,    "Deep
            begda TYPE hrp1000-begda,
            endda TYPE hrp1000-endda,
       END OF orgunit_tab1.

DATA: orgunit_tab TYPE TABLE OF orgunit_tab1,
          wa_orgunit_tab LIKE LINE OF orgunit_tab.

when i try to move data to the deep structre i get it in one string in field org and not

in separate fields in org how can i use deep and get it separate fields?

Regards

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
414

Hi,

Please try this.


TYPES: BEGIN OF  orgunit_tab1, 
         org TYPE hrobject,    "Deep
         begda TYPE hrp1000-begda,
         endda TYPE hrp1000-endda,
       END OF orgunit_tab1.
 
DATA: orgunit_tab TYPE STANDARD TABLE OF orgunit_tab1,
      wa_orgunit_tab TYPE orgunit_tab.

DATA:  wa_org TYPE hrobject.

wa_org-plvar = <...>.
wa_org-otype = <...>.
wa_org-objid = <...>.

wa_orgunit_tab-org = wa_org.
wa_orgunit_tab-begda = <...>.
wa_orgunit_tab-endda = <...>.

append wa_orgunit_tab to orgunit_tab.

Regards,

Ferry Lianto

2 REPLIES 2
Read only

Former Member
0 Likes
414

u have to access field like this.

wa_orgunit_tab -hrobject- fieldname

Read only

ferry_lianto
Active Contributor
0 Likes
415

Hi,

Please try this.


TYPES: BEGIN OF  orgunit_tab1, 
         org TYPE hrobject,    "Deep
         begda TYPE hrp1000-begda,
         endda TYPE hrp1000-endda,
       END OF orgunit_tab1.
 
DATA: orgunit_tab TYPE STANDARD TABLE OF orgunit_tab1,
      wa_orgunit_tab TYPE orgunit_tab.

DATA:  wa_org TYPE hrobject.

wa_org-plvar = <...>.
wa_org-otype = <...>.
wa_org-objid = <...>.

wa_orgunit_tab-org = wa_org.
wa_orgunit_tab-begda = <...>.
wa_orgunit_tab-endda = <...>.

append wa_orgunit_tab to orgunit_tab.

Regards,

Ferry Lianto