Application Development 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: 

Sample coding for reterieving values form fun. module' MRM_DBTAB_RSEG_READ'

Former Member
0 Kudos

hi all,

I am able to give all the import and export parmenter but the problem occurs only when i try to loop the internal table got from the function module. Pls do provide the coding for retrieving the values from the function module ' MRM_DBTAB_RSEG_READ'.

I promise to award points.

Regards,

anitha

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is some sample code




report zrich_0003 .

type-pools: mrm.

data: irseg type  mrm_tab_rseg.
data: xrseg like line of irseg.


parameters: p_belnr type rseg-belnr.
parameters: p_gjahr type rseg-gjahr.

call function 'MRM_DBTAB_RSEG_READ'
  exporting
    i_belnr               = p_belnr
    i_gjahr               = p_gjahr
*   I_BUFFER_ON           = X
 importing
   te_rseg               = irseg
 exceptions
   entry_not_found       = 1
   others                = 2.


loop at irseg into xrseg.
  write:/ xrseg-belnr,
          xrseg-gjahr,
          xrseg-buzei,
          xrseg-ebeln,
          xrseg-ebelp.

endloop.

Regards,

Rich Heilman

1 REPLY 1

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is some sample code




report zrich_0003 .

type-pools: mrm.

data: irseg type  mrm_tab_rseg.
data: xrseg like line of irseg.


parameters: p_belnr type rseg-belnr.
parameters: p_gjahr type rseg-gjahr.

call function 'MRM_DBTAB_RSEG_READ'
  exporting
    i_belnr               = p_belnr
    i_gjahr               = p_gjahr
*   I_BUFFER_ON           = X
 importing
   te_rseg               = irseg
 exceptions
   entry_not_found       = 1
   others                = 2.


loop at irseg into xrseg.
  write:/ xrseg-belnr,
          xrseg-gjahr,
          xrseg-buzei,
          xrseg-ebeln,
          xrseg-ebelp.

endloop.

Regards,

Rich Heilman