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

problem idn displaying data in table control

Former Member
0 Likes
2,054

hi

i have searched almost every forum and tried to execute my program but still it is giving problem.

means it does not display the data when i execute the trasanction. it keeps tablecontrol blank.

pls see my code below and give me soloution. plz

In SE51

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

loop at itab with control tcb.

module mapdata.

endloop.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

loop at itab.

endloop.

In SE38

MODULE STATUS_0100 OUTPUT.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

select * from zpvcust into table itab.

*read table itab into tcb.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Module mapdata OUTPUT

&----


  • text

----


MODULE mapdata OUTPUT.

zpvcust-custno = itab-custno.

zpvcust-custname = itab-custname.

ENDMODULE. " mapdata OUTPUT

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
974

Hi Vikas

This code you follow the i am sure tou will get the values

process before output.
  module status_0103.
  module get_data.
  loop at   it_bapi3008_2
       into lw_bapi3008_2
       with control tc_data
       cursor tc_data-current_line.
    module tc_data_get_lines.
  endloop.

module getdata output.
  call function 'BAPI_AP_ACC_GETOPENITEMS'
    exporting
      companycode       = 'RS01'
      vendor            = name
      keydate           = ket_data
   noteditems           = 'X'
* IMPORTING
*   RETURN            =
    tables
      lineitems         =  it_bapi3008_2.

  call function 'BAPI_AR_ACC_GETOPENITEMS'
    exporting
      companycode       = 'RS01'
      customer          = lfa1-kunnr
      keydate           = ket_data
*      NOTEDITEMS        = ' '
*      SECINDEX          = ' '
*    IMPORTING
*      RETURN            =
    tables
      lineitems         = it_bapi3007_2.
  loop at it_bapi3007_2 into lw_bapi3007_2.
    lw_bapi3008_2-doc_no = lw_bapi3007_2-doc_no.
    lw_bapi3008_2-doc_date = lw_bapi3007_2-doc_date.
    lw_bapi3008_2-lc_amount = lw_bapi3007_2-lc_amount.
    lw_bapi3008_2-db_cr_ind = lw_bapi3007_2-db_cr_ind.
    lw_bapi3008_2-doc_type  =  lw_bapi3007_2-doc_type.
    lw_bapi3008_2-amt_doccur = lw_bapi3007_2-amt_doccur.
    append lw_bapi3008_2 to it_bapi3008_2.
    clear lw_bapi3008_2.
  endloop.
endmodule.                 " GETDATA  OUTPUT
module tc_data_get_lines output.
  data g_tc_data_lines type sy-loopc.
  g_tc_data_lines = sy-loopc.
 endmodule.                    "

try it you will get the values

Regards Nilesh

4 REPLIES 4
Read only

Former Member
0 Likes
974

HI,

You are getting the data into Itab from Z table and hopefully your table control contains fields from Itab. Hence there is no need to move data from Z table ( Which is Just Work Area) as follows

zpvcust-custno = itab-custno.

zpvcust-custname = itab-custname.

simplty remove module mapping and check.

in this case table control contains fields from Itab only

Cheers

Ram

Read only

Former Member
0 Likes
974

Hi,

If the data which you are trying to display in the table control, if that data is there in the internal table but the same data you are not able to see in the table control... If this is your problem.. Please you correct it in the below way.....

First of all go to the program and see what exactly is the data type which you have declared for the field ( structure in the program ) which you are not able to see in the table control.

now give the same data type in the properties tab of the table control of that field....

suppose if it is date field in you program( structure ) give the same in the properties tab of that field..

do the above way and activate and check now, it will work...

Revert me back if you have further queries...

Regards

Kumar

Read only

Former Member
0 Likes
974

Hi,

If you are only trying to display the data on the table control, then you write your code in the PBO.

Debug and check if some part of the code is clearing the internal table in the PAI.

Otherise like what fellow members have suggested, check your declarations.

Read only

Former Member
0 Likes
975

Hi Vikas

This code you follow the i am sure tou will get the values

process before output.
  module status_0103.
  module get_data.
  loop at   it_bapi3008_2
       into lw_bapi3008_2
       with control tc_data
       cursor tc_data-current_line.
    module tc_data_get_lines.
  endloop.

module getdata output.
  call function 'BAPI_AP_ACC_GETOPENITEMS'
    exporting
      companycode       = 'RS01'
      vendor            = name
      keydate           = ket_data
   noteditems           = 'X'
* IMPORTING
*   RETURN            =
    tables
      lineitems         =  it_bapi3008_2.

  call function 'BAPI_AR_ACC_GETOPENITEMS'
    exporting
      companycode       = 'RS01'
      customer          = lfa1-kunnr
      keydate           = ket_data
*      NOTEDITEMS        = ' '
*      SECINDEX          = ' '
*    IMPORTING
*      RETURN            =
    tables
      lineitems         = it_bapi3007_2.
  loop at it_bapi3007_2 into lw_bapi3007_2.
    lw_bapi3008_2-doc_no = lw_bapi3007_2-doc_no.
    lw_bapi3008_2-doc_date = lw_bapi3007_2-doc_date.
    lw_bapi3008_2-lc_amount = lw_bapi3007_2-lc_amount.
    lw_bapi3008_2-db_cr_ind = lw_bapi3007_2-db_cr_ind.
    lw_bapi3008_2-doc_type  =  lw_bapi3007_2-doc_type.
    lw_bapi3008_2-amt_doccur = lw_bapi3007_2-amt_doccur.
    append lw_bapi3008_2 to it_bapi3008_2.
    clear lw_bapi3008_2.
  endloop.
endmodule.                 " GETDATA  OUTPUT
module tc_data_get_lines output.
  data g_tc_data_lines type sy-loopc.
  g_tc_data_lines = sy-loopc.
 endmodule.                    "

try it you will get the values

Regards Nilesh