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: 

Problem with Select Option Value in ABAP Report

Former Member
0 Kudos

Hi Gurus / Experts,

I have a problem with my report, when I try to get a data from the table, I try to use my select option which in data type with format spmon.

Whey I try to debug it, I think something happen with my report.

Example :

I try to input this in my screen.

PO Number = 4500000372

Selection Date = 07.2013 to 10.2013.

But when I debugged it, it just appear from 07 to 09 (we have the 10th month data but not appear).

Can someone explain to me ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

    In your selection screen ur giving s_budat in month wise

   like 07.2013 to 10.2013. 

now i will give some hints it will help u.

DATA : SDATE LIKE SY-DATUM,            " First date of the month
       EDATE LIKE SY-DATUM,            " Last date of the current month
       RDATE LIKE SY-DATUM,

       V_DAYS TYPE I,
       V_DAYS1(2).



   CONCATENATE S_BUDAT-LOW+0(4) S_BUDAT-LOW+4(2) '01' INTO SDATE.
   CONCATENATE S_BUDAT-LOW+0(4) S_BUDAT-LOW+4(2) '01' INTO RDATE.
   CONCATENATE S_BUDAT-HIGH+0(4) S_BUDAT-HIGH+4(2) '01' INTO TDATE.


   CALL FUNCTION 'RE_LAST_DAY_OF_MONTH'
     EXPORTING
       I_DATUM = TDATE
     IMPORTING
       E_TT    = V_DAYS
     EXCEPTIONS
       OTHERS  = 1.
   V_DAYS1 = V_DAYS.

   CONCATENATE TDATE+0(6) V_DAYS1 INTO EDATE.

   RDATE = RDATE - 1.
   CALL FUNCTION 'RE_LAST_DAY_OF_MONTH'
     EXPORTING
       I_DATUM = RDATE
     IMPORTING
       E_TT    = V_DAYS
     EXCEPTIONS
       OTHERS  = 1.
   V_DAYS1 = V_DAYS.
   CONCATENATE RDATE+0(6) V_DAYS1 INTO RDATE.


Now your select statement u will give conditions like this


   MKPF~BUDAT >= SDATE AND MKPF~BUDAT <= EDATE


I think it will helpful for you.

31 REPLIES 31

Former Member
0 Kudos

hi,

            Use at selection screen  for your requirment then oly its work

SELECT-OPTIONS S_SPMON FOR S001-SPMON .

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_SPMON-LOW.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_SPMON-HIGH.







Regards,

gopi

0 Kudos

Hi Gopi,

I try it but nothing happen..

0 Kudos

share your code..

0 Kudos

Hi Farid I will attached it

raymond_giuseppi
Active Contributor
0 Kudos

Can you post the useful codes of

  • SELECTION-SCREEN (SELECT-OPTIONS)
  • SELECT FROM table WHERE clause

Regards,

Raymond

0 Kudos

Hi Raymond,

I cant copy/paste it, I don't know why, SCN not allow to paste it, I will write a few of it.

I am attached it now

0 Kudos

You have to convert your period (s_budat) range on yyyymm to a date range yyyymmjj.

Loop at the input range (on year/period) and convert to a range on date using  FIRST_DAY_IN_PERIOD_GET for s_budat-low  and LAST_DAY_IN_PERIOD_GET for s_budat-high, use same values for sign and option, append to a type range of datum internal table, and use this one in where clause on date.

  • You will require company calendar information to convert period to day (t001-periv, or use a default value 'K0' for calendar years)
  • Beware month/period format, some FMs require a 3 character long field

Currently when you required periods 2013.07 to 2013.10, you required dates from 2013.07.00 to 2013.10.00, so actually rselected 2013.07.01 to 2013.09.30

Regards,

Raymond

0 Kudos

If the FMs disturb you you can easily convert period to date (remember that internal format are YYYYMM and YYYYMMDD not depending from user parameters)

  • for low : CONCATENATE PERIOD '01' INTO DATE
  • for high add 1 to PERIOD (if december add 100 and move '01' in last characters), CONCATENATE PERIOD '01' INTO DATE and SUBTRACT 1 FROM DATE
  • Do this in a LOOP AT PERIOD, and APPEND date range in a TYPE RANGE OF sy-satum internal table

Regards,

Raymond

Former Member
0 Kudos

Hey RI,

Try giving 11.2013 in your selection screen, you may get the data for 10th month as well.

Sharing the code will be helpful to analyse the issue further.

Regards,

Bhaskar

0 Kudos

Hi bhaskar,

I know with that, but my client not want to be like that.

do you have any solution ???

I will attach my code in this comment

0 Kudos

Hello Ri,

I think I got the issue.

S_BUDAT-LOW is having 07.2013 & S_BUDAT-HIGH = 10.2013.

When you transfer these to ENDDA and BEGDA as they existed. here you are trying to sending 07.2013 to BEGDA which is expected in 8 chards i.e. **.**.**** .

you are missing the date number i think.

Let us know if this is helpful to you.

Thanks and Regards,

bhaskar

0 Kudos

hi zaldy,

       check  first financial strategy and then follow that.

try to write  code using with ranges and never write select statement with inner joins...

Tomas_Buryanek
Active Contributor
0 Kudos

Hi Ri Zaldy,

I checked your code and its simple problem:

Your select-option s_budat is type mcs0-spmon (NUMC 6) but you are using it to compare MKPF-BUDAT (DATS 8).

...

AND mkpf~budat IN s_budat

...

Solution from head - before selecting just convert SPMON values to BUDAT. Create range table type BUDAT. Example: 201307 to 20130701... But I think you will need to change "high" values to last day of that month => example 201310 to 20131031.

-- Tomas --

0 Kudos

Hi Tomas,

if the date change into 2014, must I code again ?? can u give me more example ?

0 Kudos

No you can do it universal. There are some standard FMs for "last day of month" (mostly unreleased though) or you can create your own small subroutine/method.

Try search for that. You will definitely find what you need.

-- Tomas --

Former Member
0 Kudos

hi ri,

        hi values in not coming in s_budat   select options . i am trying  wait???

Regards,

gopi

rajucd81
Participant
0 Kudos

Hi

I don't understand one thing that why you want you use DATA  : month_year TYPE mcs0-spmon. since you are doing condition with mkpf-budat so s_budat is also should be budat type. i have seen your code, i dont think so if you use budat type to s_budat selection parameter, will be an issue for your requirement.

CALL FUNCTION 'HR_CALC_YEAR_MONTH_DAY'

    EXPORTING

      BEGDA      = beg_date

      ENDDA      = end_date

    IMPORTING

      MONTHS_OUT = no_of_months

In the aove FM Exporting paratmeters are datum type like budat so happily you can use  DATA  : month_year TYPE mkpf-budat.

Former Member
0 Kudos

Hi Raju,

My reason why I use mcs0-spmon is to get the select option become compatible for month and year.

if I use mkpf-budat it just will become a date dd.mm.yyyy and my client just want the mm.yyyy.

Former Member
0 Kudos

hi,

          Right now u just use like this.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_budat-LOW.
   s_budat-low = '201307'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_budat-HIGH.
   s_budat-HIGH = '201311'.




Regards,

gopi

former_member203305
Active Contributor
0 Kudos

Hi.

just need to change this

  beg_date       = s_budat-low.

  end_date       = s_budat-high.

concatenate s_budat-low '01' into beg_date.

concatenate s_budat-high '01' into end_date.

Also need to think what happens when end_date is initial.

if end_date is initial. end_date = beg_date. endif.

Regards

Miguel

Former Member
0 Kudos

Dear Ri Zaldy

     Please Try

     select-options opt for s012-spmon .


its your perfect Solution with select options.


Regards

Mohit Pandya

Former Member
0 Kudos

hi ri,

      whether u found the solution for this??????????

Regards,

Gopi

Former Member
0 Kudos

hi,

    In your selection screen ur giving s_budat in month wise

   like 07.2013 to 10.2013. 

now i will give some hints it will help u.

DATA : SDATE LIKE SY-DATUM,            " First date of the month
       EDATE LIKE SY-DATUM,            " Last date of the current month
       RDATE LIKE SY-DATUM,

       V_DAYS TYPE I,
       V_DAYS1(2).



   CONCATENATE S_BUDAT-LOW+0(4) S_BUDAT-LOW+4(2) '01' INTO SDATE.
   CONCATENATE S_BUDAT-LOW+0(4) S_BUDAT-LOW+4(2) '01' INTO RDATE.
   CONCATENATE S_BUDAT-HIGH+0(4) S_BUDAT-HIGH+4(2) '01' INTO TDATE.


   CALL FUNCTION 'RE_LAST_DAY_OF_MONTH'
     EXPORTING
       I_DATUM = TDATE
     IMPORTING
       E_TT    = V_DAYS
     EXCEPTIONS
       OTHERS  = 1.
   V_DAYS1 = V_DAYS.

   CONCATENATE TDATE+0(6) V_DAYS1 INTO EDATE.

   RDATE = RDATE - 1.
   CALL FUNCTION 'RE_LAST_DAY_OF_MONTH'
     EXPORTING
       I_DATUM = RDATE
     IMPORTING
       E_TT    = V_DAYS
     EXCEPTIONS
       OTHERS  = 1.
   V_DAYS1 = V_DAYS.
   CONCATENATE RDATE+0(6) V_DAYS1 INTO RDATE.


Now your select statement u will give conditions like this


   MKPF~BUDAT >= SDATE AND MKPF~BUDAT <= EDATE


I think it will helpful for you.

0 Kudos

hi priya,

Actually the problem in the code is that parameters

DATA  : month_year TYPE s001-spmon.

s_ebeln FOR wa_ekpo-ebeln OBLIGATORY NO INTERVALS,
                  s_budat FOR month_year.

if we click s_budat means that value is not coming automatically. i we manually fix means values is coming. whether your code will solve this issue??? i dint check just confirming..

Regards,

Gopi

0 Kudos

Ok, then U can difine select options like this

SELECT-OPTIONS  SPBUP FOR S001-SPBUP OBLIGATORY


this is also period to analyze.



check it this once


0 Kudos

Hi priya,

I still confuse,

what is TDATE, RDATE,

why there are no TDATE at variable declaration ?

0 Kudos

hi,

i forget Tdate in declaration..

  TDATE LIKE SY-DATUM,

     Tdate ,Rdate also date our requirement purpose we declared...

 


In ur selection screen ur declared Date like this   08.2013 to 10.2013..


Then RDATE or SDATE Both is same... 01.08.2013

Tdate    is 01.10.2013 After  Using this function module  RE_LAST_DAY_OF_MONTH

u will get last day of the month.. After Change the TDATE is EDATE..Noe EDATE is 31.10.2013...



former_member209120
Active Contributor
0 Kudos

Hi Ri Zaldy

Try like this

************************************************************************
*Declaration ALV                                                       *
************************************************************************
TYPE-POOLS : slis.
TABLES : mkpf.
************************************************************************
*Declaration Internal Table                                            *
************************************************************************
DATA  : BEGIN OF itab OCCURS 0,
           matnr TYPE ekpo-matnr,
           txz01 TYPE ekpo-txz01,
           budat TYPE mkpf-budat,
           mjahr TYPE mseg-mjahr,
           mblnr TYPE mseg-mblnr,
           bwtar TYPE mseg-bwtar,
           erfmg TYPE mseg-erfmg,
           lgort TYPE mseg-lgort,
           menge TYPE mseg-menge,
           werks TYPE mseg-werks,
           clabs TYPE mchb-clabs,
           bwart TYPE mseg-bwart,
           mseh3 TYPE t006a-mseh3,
         END OF itab.

DATA  : BEGIN OF itab2 OCCURS 0,
           matnr TYPE ekpo-matnr,
           txz01 TYPE ekpo-txz01,
           mjahr TYPE mseg-mjahr,
           mblnr TYPE mseg-mblnr,
           bwtar TYPE mseg-bwtar,
           erfmg TYPE mseg-erfmg,
           lgort TYPE mseg-lgort,
           menge TYPE mseg-menge,
           werks TYPE mseg-werks,
           clabs TYPE mchb-clabs,
           bwart TYPE mseg-bwart,
           mseh3 TYPE t006a-mseh3,
         END OF itab2.

DATA  : BEGIN OF itab3 OCCURS 0,
           matnr TYPE ekpo-matnr,
           txz01 TYPE ekpo-txz01,
           bwtar TYPE mseg-bwtar,
           erfmg TYPE mseg-erfmg,
           lgort TYPE mseg-lgort,
           menge TYPE mseg-menge,
           werks TYPE mseg-werks,
           clabs TYPE mchb-clabs,
           mseh3 TYPE t006a-mseh3,
         END OF itab3.

DATA   ifc      TYPE slis_t_fieldcat_alv.
DATA   xfc      TYPE slis_fieldcat_alv.
DATA   repid    TYPE sy-repid.
DATA   i_sort TYPE  slis_t_sortinfo_alv.
DATA   wa_sort TYPE slis_sortinfo_alv.

DATA  : wa_ekpo TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
         wa_mkpf TYPE STANDARD TABLE OF mkpf WITH HEADER LINE.

DATA  : beg_date TYPE begda,
         end_date TYPE endda,
         no_of_months TYPE p0000_af-nomns,
         result(7) TYPE p DECIMALS 3,
         ponumb_begin(10) TYPE c,
         ponumb_end(10) TYPE c,
         ponumb TYPE c.

DATA  : it_listheader TYPE slis_t_listheader.
DATA  : wa_listheader TYPE slis_listheader.


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_ebeln FOR wa_ekpo-ebeln OBLIGATORY NO INTERVALS,
                  s_budat FOR mkpf-budat.
SELECTION-SCREEN END OF BLOCK b1.

INITIALIZATION.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_budat-low.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_budat-high.

START-OF-SELECTION.


   PERFORM get_data.
   PERFORM call_alv.
************************************************************************
*Perform get_data                                                      *
************************************************************************
FORM get_data.

   CLEAR itab. REFRESH itab. CLEAR itab2. REFRESH itab2.

   beg_date       = s_budat-low.
   end_date       = s_budat-high.
   ponumb_begin   = s_ebeln-low.
   ponumb_end     = s_ebeln-high.

   SELECT  mkpf~budat
           mseg~matnr
           ekpo~txz01
           mseg~mblnr
           mseg~mjahr
           mseg~bwtar
           mseg~erfmg
           mseg~lgort
           mseg~menge
           mseg~werks
           mchb~clabs
           mseg~bwart
           t006a~mseh3

       INTO CORRESPONDING FIELDS OF TABLE itab
       FROM mseg
         INNER JOIN ekpo ON mseg~matnr = ekpo~matnr AND
                            mseg~bwtar = ekpo~bwtar AND
                            mseg~werks = ekpo~werks AND
                            mseg~charg = ekpo~bwtar AND
                            mseg~bukrs = ekpo~bukrs AND
                            mseg~meins = ekpo~meins
         INNER JOIN mkpf ON mseg~mblnr = mkpf~mblnr AND
                            mseg~mjahr = mkpf~mjahr
         INNER JOIN mchb ON mchb~matnr = ekpo~matnr AND
                            mchb~werks = ekpo~werks AND
                            mchb~charg = mseg~charg AND
                            mchb~lgort = mseg~lgort
         INNER JOIN t006a ON mseg~meins = t006a~msehi AND
                             t006a~spras = 'EN'
         WHERE ekpo~ebeln IN s_ebeln
           AND mkpf~budat IN s_budat
           AND mseg~bwart IN (101,102,201,202).
************************************************************************

   SELECT  mseg~matnr
           ekpo~txz01
           mseg~mblnr
           mseg~mjahr
           mseg~bwtar
           mseg~erfmg
           mseg~lgort
           mseg~menge
           mseg~werks
           mchb~clabs
           mseg~bwart
           t006a~mseh3

       INTO CORRESPONDING FIELDS OF TABLE itab2
       FROM mseg
         INNER JOIN ekpo ON mseg~matnr = ekpo~matnr AND
                            mseg~bwtar = ekpo~bwtar AND
                            mseg~werks = ekpo~werks AND
                            mseg~charg = ekpo~bwtar AND
                            mseg~bukrs = ekpo~bukrs AND
                            mseg~meins = ekpo~meins
         INNER JOIN mkpf ON mseg~mjahr = mkpf~mjahr AND
                            mseg~mblnr = mkpf~mblnr
         INNER JOIN mchb ON mchb~matnr = ekpo~matnr AND
                            mchb~werks = ekpo~werks AND
                            mchb~charg = mseg~charg AND
                            mchb~lgort = mseg~lgort
         INNER JOIN t006a ON mseg~meins = t006a~msehi AND
                             t006a~spras = 'EN'
         WHERE ekpo~ebeln IN s_ebeln
           AND mseg~bwart IN (101,102,201,202).
************************************************************************
*Call Difference between Date                                          *
************************************************************************
   CALL FUNCTION 'HR_CALC_YEAR_MONTH_DAY'
     EXPORTING
       begda      = beg_date
       endda      = end_date
     IMPORTING
       months_out = no_of_months.
   result = no_of_months + 1.
************************************************************************

   LOOP AT itab.
     IF itab-bwart = '101' OR itab-bwart = '102'.
       CLEAR itab-erfmg.
     ELSEIF itab-bwart = '201' OR itab-bwart = '202'.
       CLEAR itab-menge.
     ENDIF.
     MODIFY itab.

     IF itab-bwart = '102' AND itab-menge > 0.
       itab-menge = itab-menge * -1.
       MODIFY itab.
     ELSEIF
       itab-bwart = '202' AND itab-erfmg > 0.
       itab-erfmg = itab-erfmg * -1.
       MODIFY itab.
     ENDIF.

     CLEAR itab-clabs.

     MOVE-CORRESPONDING itab TO itab3.
     COLLECT itab3.

   ENDLOOP.

   LOOP AT itab2.

     CLEAR itab2-erfmg. CLEAR itab2-menge. CLEAR itab2-clabs.

     MOVE-CORRESPONDING itab2 TO itab3.
     COLLECT itab3.

   ENDLOOP.

   SORT itab2 BY matnr bwtar werks lgort mblnr mjahr.

   LOOP AT itab3.
     READ TABLE itab2 WITH KEY matnr = itab3-matnr
                               bwtar = itab3-bwtar
                               werks = itab3-werks
                               lgort = itab3-lgort.
     itab3-clabs = itab2-clabs.
     MODIFY itab3.

     IF itab3-erfmg > 0.
       itab3-erfmg = itab3-erfmg / result.
       MODIFY itab3.
     ENDIF.

   ENDLOOP.

   LOOP AT itab3.
     IF itab3-menge > 0.
       itab3-menge = itab3-menge / result.
       MODIFY itab3.
     ENDIF.

   ENDLOOP.


   "CLEAR itab. CLEAR itab2. REFRESH itab. REFRESH itab2.

ENDFORM.                    "get_data
*&---------------------------------------------------------------------*
*&      Form  call_alv
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM call_alv.
************************************************************************
*Perform call_alv                                                      *
************************************************************************

   DATA  : ifc   TYPE slis_t_fieldcat_alv.
   DATA  : xfc   TYPE slis_fieldcat_alv.
   DATA  : repid TYPE sy-repid.

   repid = sy-repid.

   wa_listheader-typ  = 'H'.
   wa_listheader-info  = 'Report Rata-rata Pembelian dan Pemakaian '.
   APPEND wa_listheader TO it_listheader.
   CLEAR wa_listheader.

   wa_listheader-typ = 'S'.
   wa_listheader-key ='PO No'.
   LOOP AT itab3.
     IF ponumb_begin <> ' '.
       wa_listheader-info = s_ebeln-low.
     ENDIF.
   ENDLOOP.
   APPEND wa_listheader TO it_listheader.
   CLEAR wa_listheader.

   wa_listheader-typ = 'S'.
   wa_listheader-key ='Selection Date'.
   CONCATENATE  beg_date+4(2)'/'
                beg_date(4)
                '-'
                end_date+4(2)'/'
                end_date(4)
                INTO wa_listheader-info.
   APPEND wa_listheader TO it_listheader.
   CLEAR wa_listheader.

   wa_listheader-typ = 'S'.
   wa_listheader-key = 'Tgl Stock on Hand'.
   CONCATENATE  sy-datum+6(2)
                sy-datum+4(2)
                sy-datum(4)
                INTO wa_listheader-info
                SEPARATED BY '/'.
   APPEND wa_listheader TO it_listheader.
   CLEAR wa_listheader.

   wa_listheader-typ = 'S'.
   wa_listheader-key = 'Jam Stock on Hand'.
   CONCATENATE  sy-uzeit+0(2)
                sy-uzeit+2(2)
                sy-uzeit+4(2)
                INTO wa_listheader-info
                SEPARATED BY ':'.
   APPEND wa_listheader TO it_listheader.
   CLEAR wa_listheader.


**  CLEAR ifc. CLEAR xfc.
**  CLEAR xfc.
   xfc-reptext_ddic = 'Material Number'.
   xfc-fieldname    = 'MATNR'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '15'.
   xfc-key          = 'X'.
   xfc-do_sum       = 'X'.
   xfc-col_pos      = '1'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Description'.
   xfc-fieldname    = 'TXZ01'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '30'.
   xfc-col_pos      = '2'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Val. Type'.
   xfc-fieldname    = 'BWTAR'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '15'.
   xfc-col_pos      = '4'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Rata-rata Pemakaian'.
   xfc-fieldname    = 'ERFMG'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '15'.
   xfc-col_pos      = '5'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Satuan'.
   xfc-fieldname    = 'MSEH3'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '7'.
   xfc-col_pos      = '6'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'S. Loc'.
   xfc-fieldname    = 'LGORT'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '10'.
   xfc-col_pos      = '7'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Rata-rata Pembelian'.
   xfc-fieldname    = 'MENGE'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '15'.
   xfc-col_pos      = '8'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Satuan'.
   xfc-fieldname    = 'MSEH3'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '7'.
   xfc-col_pos      = '9'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Plant'.
   xfc-fieldname    = 'WERKS'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '10'.
   xfc-col_pos      = '10'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Stock on Hand'.
   xfc-fieldname    = 'CLABS'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '15'.
   xfc-col_pos      = '11'.
   APPEND xfc TO ifc.

   CLEAR xfc.
   xfc-reptext_ddic = 'Satuan'.
   xfc-fieldname    = 'MSEH3'.
   xfc-tabname      = 'ITAB3'.
   xfc-outputlen    = '7'.
   xfc-col_pos      = '12'.
   APPEND xfc TO ifc.
************************************************************************

************************************************************************
*Call ABAP List Viewer (ALV)                                           *
************************************************************************
   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
       i_callback_program     = repid
       it_fieldcat            = ifc
       i_callback_top_of_page = 'TOP_OF_PAGE'
       it_sort                = i_sort
     TABLES
       t_outtab               = itab3.

   IF sy-subrc <> 0.
* Implement suitable error handling here
   ENDIF.

ENDFORM.                    "call_alv
************************************************************************
*Call Header (ALV)                                                     *
************************************************************************
FORM top_of_page.

   CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
     EXPORTING
       it_list_commentary = it_listheader.
ENDFORM.                    "top_of_page

0 Kudos

Hi Ramesh,

still not work, I think someone give me this suggestion before.

0 Kudos

Hi Priya,

Thank you so much.

Now my problem is solved thank you.

0 Kudos

hi,

       finally your problem solved.. good.

Regards,

gopi