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 in at selection screen

Former Member
0 Kudos

hai friends,

i have two radio buttons in my selection-screen . one is for application server file and another is for local file.when i select the local file radio button one excel file should get genarated and when i click on appln sever button then the file should b transferred to the applin server(given path).of course these things are working fine.but if i come back to the same sel-screen and again execute the program then i am getting the alv list with double columns(the ccolums which have r getting repeated in my list) and vice-versa.

if u want plz see my code also.

SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.

SELECT-OPTIONS : s_date FOR ztbukxxin003-z_manufdate NO-EXTENSION.

SELECTION-SCREEN END OF BLOCK blk1.

SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME TITLE text-006.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: p_rad1 TYPE c RADIOBUTTON GROUP grp1 USER-COMMAND urad

DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(15) text-007 FOR FIELD p_lopath.

PARAMETERS: p_lopath LIKE filename-pathintern DEFAULT

'ZS_SESAM_SEND_EDI'.

PARAMETERS : p_lofile LIKE filename-fileintern DEFAULT 'ZTBUKXXIN008'.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINe.

PARAMETERS: p_rad2 TYPE c RADIOBUTTON GROUP grp1 .

SELECTION-SCREEN COMMENT 5(15) text-009 FOR FIELD p_file.

PARAMETERS : p_file LIKE rlgrap-filename.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK blk3.

************************************************************************

  • A T S E L E C T I O N - S C R E E N *

************************************************************************

DATA : i_mdate TYPE ztbukxxin003-z_manufdate.

AT SELECTION-SCREEN .

Validate manufacture date on the selection screen.

SELECT SINGLE z_manufdate

INTO i_mdate

FROM ztbukxxin003

WHERE z_ndsnum LIKE 'CEA%' AND

z_manufdate IN s_date.

IF sy-subrc NE 0.

MESSAGE 'Enter the date in the format YYYY/MM/DD' TYPE 'E'.

ENDIF.

IF p_rad1 EQ 'X'.

PERFORM get_appl_file USING p_lofile.

ELSEIF p_rad2 EQ 'X'.

PERFORM get_local_file USING p_file.

ENDIF.

of course here if i write the above 5 lines of code in at selection screen on value-request for p_file.then the program not getting executed also.that's why i have wrote everything in at sel-screen only.

i guess the problem is in events only.but i am not able to understand what code can b added adn what code deleted from this.

any solution from anybody.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

There is no issues with event. Refresh ITAB wich you are passing to ALV function before filling it.

or

do this

if itab[] is initial.

select statement.

endif.

If not helpful paste the full code.

Aditya

3 REPLIES 3

Former Member
0 Kudos

Hi

There is no issues with event. Refresh ITAB wich you are passing to ALV function before filling it.

or

do this

if itab[] is initial.

select statement.

endif.

If not helpful paste the full code.

Aditya

former_member404244
Active Contributor
0 Kudos

Hi,

Try the below code and see

IF p_rad1 EQ 'X'.

refresh : itab.

PERFORM get_appl_file USING p_lofile.

once u read the file and put in internal table then use clear command and clear the file.

clear : p_lofile

ELSEIF p_rad2 EQ 'X'.

refresh : itab.

PERFORM get_local_file USING p_file.

once u read the file and put in internal table then use clear command and clear the file.

clear : p_file.

ENDIF.

Regards,

nagaraj

Former Member
0 Kudos

thank u for ur response