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: 

abap parameters

0 Kudos

hello all ,

actually i have 2 different programs, in both the programs i have defined a parameter which can collect the file-name through the f4_filename , and i have defined a default value to the parameter in both the programs and i am requesting a value for both the parameters at selection screen on because, i want to display a default value if in case i am not ok with the default value so i can go and select a file name, this was working fine for me with the first program

scenario 1.

the param in 1st program has a default value and a value request statement at selection screen on . while executing this it goes fine .. i mean if i directly hit execute without choosing a filename through selection or if i try to choose a file it works well,

but in scenario 2.

in program 2 .. when i hit execute directly when a value is already defined due to default value .. the value being displayed in the field section, it doesnt run.. but when i select a file name it works well..

11 REPLIES 11

r010101010
Active Participant

Hello Sanjay,

What do you mean 'it doesnt run' ? does does the program 2 does not recognise the value in the parameter ?

Since you are using events in the report, i would advise you to have your main process in the event 'On start of select'.

If this does not work, please add the codes for program 2 ensuring to remove client sentisitive info and keep only the get data part.

former_member184158
Active Contributor

hi,

could you please write ur code of progarm2 to check events what u were writing!

Sandra_Rossi
Active Contributor

I think there's a bug in your program!

0 Kudos

r010101010 thanks human for the effort ..it collects the value in the parameter but it doesnt move on to the next piece of code where i was usinfg text_convert_xls_to_sap which was written..but I was missing out on the start-of-selection event after value request at selection screen on, i think this event was blocking to get into the actual code after value request, i think i have to declare the Start-of-selection everytime if i am using value request at selection on.. I have a little clarity over this as i am a beginner.. and any further info would be helpful..

further infor would come if you post your code here. your explaination not understandable (for me)...

If you are new to programming in ABAP and you want to get an overview of the events in a report, have a look at this post, the answer from @Horst Keller 'Have a look at all events that happen, when you SUBMIT a report'

Sandra_Rossi
Active Contributor
0 Kudos

Please paste your code, a minimal verifiable example. And explain exactly how to reproduce your issue. Otherwise it's impossible to help you.

0 Kudos

sandra.rossi Ebrahim Hatem this is how my code was.

program 1.

parameter : pname type rlgrap-filename default 'abcef.xls'.

at selection screen-on value request for pname.

call 'f4_filename'.

call 'text_convert_xls_to_sap'.

loop at it_main into wa_main.

perform bdc_dynprofield using ..

perform bdc_dynprovalue using ......

endloop.

program 2.

parameter : pname type rlgrap-filename default 'abcef.xls'.

at selection screen-on value request for pname.

call 'f4_filename'.

start-of-selection.

call 'text_convert_xls_to_sap'.

loop at it_main into wa_main.

perform bdc_dynprofield using ..

perform bdc_dynprovalue using ......

endloop.

SO HERE I HAVE THE PARTS OF THE PROGRAM WHICH WAS THE REASON WHY I COULD NOT GO BEYOND.

AS IN THE PROGRAM 2 HERE MENTIONED , I AM USING THE STATEMENT

''START-OF-SELECTION'' WHICH IS THE REASON WHICH KEPT MY PROGRAM DRIVING FORWARD, AS IN THE PROGRAM 1 I WASNT USING THE START-OF-SELECTION STATEMENT FOR WHICH THE PROGRAM 1 COULD NOT GET OUT OF THE....................................

VALUE REQUEST AT SELECTION SCREEN ON EVENT AND WAS IRRESPONSIVE AFTER DIRECTLY HITTING ENTER WITHOUT SELECTING THE VALUE FROM THE DROP DOWN PROVIDED DUE TO VALUE REQUEST STATEMENT , WHEN I WAS USING THE VALUE REQUEST STATEMENT IN THE PROGRAM 1 THOUGH I HAD THE DEFAULT VALUE IN THE FIELD , IT WORKED , SO I HAVE OBSERVED THAT IF THERE IS ALREADY A VALUE DEFINED AND IF YOU ARENT USING THE VALUE REQUEST DROP DOWN THE PROGRAM WONT MOVE AHEAD IF YOU ARENT MENTIONING THE START-OF-SELECTION... ALL THIS MIGHT SOUND LITTLE STUFF AS I BELIEVE ABAP IS AN OCEAN OF THINGS .. THANKS FOR THE CONCERN

0 Kudos

Please use the CODE button to format your code so that it's more user-friendly.

So, you mean pressing F8 (Execute) on the selection screen didn't start your code, because your code was defined inside the F4 help of the "file" selection screen field. Pressing a function key (except F1 and F4) first triggers the PAI event(s) (variants of "at selection-screen" which are not POV, PBO, POH), then triggers the event "START-OF-SELECTION", then the event "END-OF-SELECTION" (both are equivalent if you don't use a Logical DataBase).

vamshi_mohan
Participant
0 Kudos

Hi,

In program 2,

replace start-of-selection with end-of-selection.

Regards,

Vamshi.