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

select-option in AR02 txcode

Former Member
0 Likes
1,428

Hi,

I want to keep select-option in AR02 txcode in the selection screen SETTINGS, i want

to replace REPORT DATE from parameter to select-options.

I have copied the standard programs RAGITT_ALV01 and LDB ADA into

Zprogram can anyone guide me to this requirment.

Regards

VEnk@

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,246

Parameter BERDATUM in include DBADASEL is used as report date.

Check the where used list of this parameter in your program.

change into select-options and make changes as per your requirement

Regards,

Keshav

8 REPLIES 8
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,247

Parameter BERDATUM in include DBADASEL is used as report date.

Check the where used list of this parameter in your program.

change into select-options and make changes as per your requirement

Regards,

Keshav

Read only

0 Likes
1,246

Hi Thanks for the reply.

I have followed your step and i have replaced ..

PARAMETERS: BERDATUM LIKE RBADA-BRDATU FOR TABLE ANLAV.

with.. in the selction screen.

SELECTION-SCREEN COMMENT 1(31) TEXT-003 FOR FIELD BERDAT1.

PARAMETERS:

BERDAT1 LIKE RBADA-BRDATU " Report start date

OBLIGATORY.

SELECTION-SCREEN COMMENT 52(05) TEXT-002 FOR FIELD BERDAT2.

PARAMETERS:

BERDAT2 LIKE RBADA-BRDATU " Report end date

OBLIGATORY.

can you guide me to the logic where i have to change so that the report will work

fine for date range.

Especially when i check the depreciation post checkbox.

Regards

VENk@

Read only

0 Likes
1,246

Hi Venkat Reddy,

Instead of that you can write like below..

TABLES : RBADA.

SELECTION-SCREEN COMMENT 1(31) TEXT-003 FOR FIELD BERDAT1.
SELECT-OPTIONS : BERDAT1 FOR RBADA-BRDATU. " Report start date " Declare tables 

But after converting it from parameter to Select-options...

Still you have to change a lot for the logic...

Program                                 Line      Code

RAGITT_ALV01                       385   CHECK     anlav-zugdt le berdatum.

                                                1341          IF ( anlav-deakt is initial or anlav-deakt > berdatum )
                                                1495   CALL FUNCTION 'LVA_RETIREMENT_SIMULATE'

RASORT14                            27   CALL FUNCTION  'DATE_TO_PERIOD_CONVERT'
                                              39   CALL FUNCTION 'LAST_DAY_IN_YEAR_GET'

RASORT_ALV_MISC                    634   SUBMIT rakomp_alv01 AND RETURN

RASORT_ALV_TOOLS                    32       CALL FUNCTION 'AREP_FBEZ_ERMITTELN'

SO it's better if you understand the logic behind it and then replace the code accoringly by coping it to Z Program...

and also If it's just for reporting purpose then you can simplify the requirement and prepare one Z Report according to user's need..

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya

Read only

0 Likes
1,246

Hi ilesh,

Thanks for the answer. Actually someone have prepared this report but report is running

correctly when we are not checking the depreciation checkbox for the date rang (select-options).

It is not running correctly i mean it is fecthing wrong data according to the date

range when deprication checkbox is checked. Hope you got it now.

Please check my subroutine get data.

FORM GET_DATA .

  • Populate Report Start Date

CLEAR FS_VARI_CONTENTS.

FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.

FS_VARI_CONTENTS-KIND = C_P.

FS_VARI_CONTENTS-SIGN = C_I.

FS_VARI_CONTENTS-OPTION = C_EQ.

FS_VARI_CONTENTS-LOW = BERDAT1.

FS_VARI_CONTENTS-HIGH = SPACE.

APPEND FS_VARI_CONTENTS TO T_VARI_CONTENTS.

  • Populate Variant table

PERFORM POPULATE_VARIANT_TABLE.

W_FLAG = '1'.

  • Submit report ZRAGITT_ALV01 using variant PPE_VARIANT

PERFORM SUBMIT_REPORT_ZRAGITT_ALV01 TABLES ITAB_DATA1[]

USING W_FLAG.

  • IF ( BERDAT2 IS NOT INITIAL ) AND

IF BERDAT1 NE BERDAT2.

DELETE T_VARI_CONTENTS INDEX 1.

  • Populate Report End Date

CLEAR FS_VARI_CONTENTS.

FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.

FS_VARI_CONTENTS-KIND = C_P.

FS_VARI_CONTENTS-SIGN = C_I.

FS_VARI_CONTENTS-OPTION = C_EQ.

FS_VARI_CONTENTS-LOW = BERDAT2.

FS_VARI_CONTENTS-HIGH = SPACE.

INSERT FS_VARI_CONTENTS INTO T_VARI_CONTENTS INDEX 1.

W_FLAG = '2'.

  • Submit report ZRAGITT_ALV01 using variant PPE_VARIANT

PERFORM SUBMIT_REPORT_ZRAGITT_ALV01 TABLES ITAB_DATA2[]

USING W_FLAG.

ENDIF. " IF BERDAT1 NE BERDAT2

IF W_ENDDATE IS NOT INITIAL.

IF W_ENDDATE NE BERDAT1.

DELETE T_VARI_CONTENTS INDEX 1.

  • Populate Report End Date

CLEAR FS_VARI_CONTENTS.

FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.

FS_VARI_CONTENTS-KIND = C_P.

FS_VARI_CONTENTS-SIGN = C_I.

FS_VARI_CONTENTS-OPTION = C_EQ.

FS_VARI_CONTENTS-LOW = W_ENDDATE.

FS_VARI_CONTENTS-HIGH = SPACE.

INSERT FS_VARI_CONTENTS INTO T_VARI_CONTENTS INDEX 1.

W_FLAG = '3'.

This is where i was strucked in.

Regards

VEnk@

Edited by: Venkat Reddy on Sep 21, 2009 12:59 PM

Read only

0 Likes
1,246

hi juect check the f1 help for that check box.

since you are using select-options just compare it with the documentation.

Hope so you will get some idea

based on this check box its picking data from LDB anla0

Read only

0 Likes
1,246

Hi,

Because it is using data from the ADA standard logical database i have copied

the standard logical database ADA into ZADA.

As it is working fine for the date range when deprepciation check is not checked.

I dont want to start code again.

Regards

VENk@

Read only

0 Likes
1,246

Hi in the below code

FORM GET_DATA .

  • Populate Report Start Date

CLEAR FS_VARI_CONTENTS.

FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.

FS_VARI_CONTENTS-KIND = C_P.

FS_VARI_CONTENTS-SIGN = C_I.

FS_VARI_CONTENTS-OPTION = C_EQ.

FS_VARI_CONTENTS-LOW = BERDAT1.

FS_VARI_CONTENTS-HIGH = SPACE.

APPEND FS_VARI_CONTENTS TO T_VARI_CONTENTS.

  • Populate Variant table

PERFORM POPULATE_VARIANT_TABLE.

W_FLAG = '1'.

  • Submit report ZRAGITT_ALV01 using variant PPE_VARIANT

PERFORM SUBMIT_REPORT_ZRAGITT_ALV01 TABLES ITAB_DATA1[]

USING W_FLAG.

  • IF ( BERDAT2 IS NOT INITIAL ) AND

IF BERDAT1 NE BERDAT2.

DELETE T_VARI_CONTENTS INDEX 1.

  • Populate Report End Date

CLEAR FS_VARI_CONTENTS.

FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.

FS_VARI_CONTENTS-KIND = C_P.

FS_VARI_CONTENTS-SIGN = C_I.

FS_VARI_CONTENTS-OPTION = C_EQ.

FS_VARI_CONTENTS-LOW = BERDAT2.

FS_VARI_CONTENTS-HIGH = SPACE.

INSERT FS_VARI_CONTENTS INTO T_VARI_CONTENTS INDEX 1.

W_FLAG = '2'.

  • Submit report ZRAGITT_ALV01 using variant PPE_VARIANT

PERFORM SUBMIT_REPORT_ZRAGITT_ALV01 TABLES ITAB_DATA2[]

USING W_FLAG.

ENDIF. " IF BERDAT1 NE BERDAT2

IF W_ENDDATE IS NOT INITIAL.

IF W_ENDDATE NE BERDAT1.

DELETE T_VARI_CONTENTS INDEX 1.

  • Populate Report End Date

CLEAR FS_VARI_CONTENTS.

FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.

FS_VARI_CONTENTS-KIND = C_P.

FS_VARI_CONTENTS-SIGN = C_I.

FS_VARI_CONTENTS-OPTION = C_EQ.

FS_VARI_CONTENTS-LOW = W_ENDDATE.

FS_VARI_CONTENTS-HIGH = SPACE.

INSERT FS_VARI_CONTENTS INTO T_VARI_CONTENTS INDEX 1.

W_FLAG = '3'.

i am trying to populate 2 dates (12/31/2008 and 05/31/2009) and i am trying to run my report

but the data is fetching for (06/30/2009) i have debugged the code and i have found that the

dates are same as i gave (12/31/2008 and 05/31/2009) in BErdat1 and BErdat2.

I need to put a check so that the data should fetch according to the dates any comments or

guidance on this ?

Any help on this ?

Regards

VEnk@

Edited by: Venkat Reddy on Sep 23, 2009 1:39 PM

Read only

0 Likes
1,246

Hi Venkat,

I too have the same requirement, i.e I have to convert the Report Date (BERDATUM) from Parameter to Select-Options.

I ahve copied RAGITT_ALV01 into a Z program, and the LDB ADA into a Z LDB.

Could you please guide me what you did for getting your problem solved?

Also, You have mentioned the someone has created a Z program for the same, if possible could you please give me a link to that program?

All help is appreciated.

Thanks.

Regards,

Sud.