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

Read and Modify Structure in Deep structure

Former Member
0 Likes
6,206

Hi All,

I ahve a scenario for that i ned to read and modify xvbpa structure in a deep structure gvt_local_memory in

Function module SD_PARTNER_DATA_GET.

Can any one Explain me how to read and modify the structure in deep structure.

Thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
2,206

Maybe this code helps:

data lt_xvbpa type LV09A_TY_XVBPA.

lt_xvbpa = GVT_LOCAL_MEMORY-XVBPA.

Not exactly sure whether this works, otherwise change the data statement into this:

data: lt_xvbpa type sorted table of VBPAV.

Good luck!

Edited by: Guus Jansen on Dec 13, 2010 2:37 PM

Read only

Former Member
0 Likes
2,206

Hi there,

suppose you have to change the field stcd2. Try this


field-symbols: <lfs_vbpa> type VBPAV.

loop at GVT_LOCAL_MEMORY.

    loop at GVT_LOCAL_MEMORY-xvbpa
               assigning <lfs_vbpa>.
        <lfs_vbpa>-stcd2 = '00000000000'.
    endloop.
endloop.

Edited by: gzervas on Dec 13, 2010 2:54 PM

Read only

Former Member
0 Likes
2,206

Hi,

try this


READ TABLE GVT_LOCAL_MEMORY-XVBPA into wa_VBPA.
MODIFY GVT_LOCAL_MEMORY-XVBPA  from WA_VBPA.

Thanks.

Edited by: anmol112 on Dec 13, 2010 11:30 AM

Read only

tushar_shukla
Active Participant
0 Likes
2,206

You can check following pseudo code .

        
*     
 LOOP AT   GVT_LOCAL_MEMORY .      " or READ TABLE
      
        GVT_XVBPA[] = GVT_LOCAL_MEMORY-XVBPA[].
         LOOP AT GVT_XVBPA .
* Modify the XVBPA field ..
                 GVT_XVBPA-field .......        
*Transfer the values to XVBPA internal table
             MODIFY GVT_XVBPA . 
          ENDLOOP.  

*  Transfer the XVBPA internal table to GVT_LOCAL_MEMORY work area
         GVT_LOCAL_MEMORY-XVBPA[] = GVT_XVBPA[]  . 
* Modify the  GVT_LOCAL_MEMORY internal table
        MODIFY  GVT_LOCAL_MEMORY. 
     ENDLOOP.         

Read only

0 Likes
2,206

HI All,

Thank you all,

The Problem is resoilved by using the below code .

GVT_LOCAL_MEMORY-XVBPA[] = FET_XVBPA[].

modified structure as below.

MODIFY GVT_LOCAL_MEMORY index 1.

Read only

0 Likes
2,206

Hi,

I need to modify a field in structure in me21n.

I found the enhancement name MM06E005. I am using exit EXIT_SAPMM06E_017 to modify the structure i_komp.

In the above exit in tkomv structure it is kbetr field. This field is same as i_komp-netpr.

I am clearing the field.In debugging it is cleared. But while displaying it is not cleared.

Cannot find the problem.

How to modify the field..

Can u please help me in this issue..

Regards,

Jenifer