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

How to do this.

Former Member
0 Likes
1,178

SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME.

PARAMETERS: p_monat LIKE zgxmit-zmonat DEFAULT sy-datum+4(2).

PARAMETERS: p_gjahr LIKE zgxmit-zgjahr DEFAULT sy-datum(4).

...

SELECTION-SCREEN END OF BLOCK a1.

Since p_monat has DEFAULT sy-datum+4(2) as above declared,

At some point inthe program ,

SELECT zprctr zgjahr zmonat rpt_loc z500_xmit bal_xmit inc_xmit

FROM zgxmit

INTO TABLE it_tbl_zgxmit

WHERE zprctr IN s_prctr AND

zgjahr = p_gjahr AND

zmonat = p_monat.

also here p_monat is sy-datum+4(2).

I am not getting the value of p_monat value which I have enetered on selection screen.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,144

Hi Sam,

Did you keep a breakpoint and checked the p_monat value right at start-of-selection and before this <b>select statement</b>? If not, can you do that and see if p_monat is changed some where?

Thanks,

Vivek

SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME.

PARAMETERS: p_monat LIKE zgxmit-zmonat DEFAULT sy-datum+4(2).

PARAMETERS: p_gjahr LIKE zgxmit-zgjahr DEFAULT sy-datum(4).

...

SELECTION-SCREEN END OF BLOCK a1.

Since p_monat has DEFAULT sy-datum+4(2) as above declared,

At some point inthe program ,

SELECT zprctr zgjahr zmonat rpt_loc z500_xmit bal_xmit inc_xmit

FROM zgxmit

INTO TABLE it_tbl_zgxmit

WHERE zprctr IN s_prctr AND

zgjahr = p_gjahr AND

zmonat = p_monat.

also here p_monat is sy-datum+4(2).

I am not getting the value of p_monat value which I have enetered on selection screen.

9 REPLIES 9
Read only

raja_thangamani
Active Contributor
0 Likes
1,144

What is the type of zgxmit-zmonat?

I tried with following code, It works fine for me.

PARAMETERS: p_monat(2) DEFAULT sy-datum+4(2).

Raja T

Read only

Former Member
0 Likes
1,144

Are you getting the value for p_monat in the selection screen?

if yes then at some point before you are selecting the data p_monat is getting cleared.

One more thing you can try is

INITIALIZATION.

p_monat = sy-datum+4(2).

Regards

Kathirvel

Read only

Former Member
0 Likes
1,145

Hi Sam,

Did you keep a breakpoint and checked the p_monat value right at start-of-selection and before this <b>select statement</b>? If not, can you do that and see if p_monat is changed some where?

Thanks,

Vivek

Read only

Former Member
0 Likes
1,144

ZGJAHR ZGJAHR NUMC 4 0 Year

ZMONAT ZMONAT NUMC 2 0 Period

Read only

Former Member
0 Likes
1,144

Sam

Please try what I have suggested above.

Regards

Kathirvel

Read only

Former Member
0 Likes
1,144

I think your code is OK. Are you sure p_monat is not being cleared out elsewhere? Try putting a watchpoint on it.

Rob

Read only

Former Member
0 Likes
1,144

i DID AS You suggested . but not working.

Read only

Former Member
0 Likes
1,144

Hi Sam

1) You did not answer to this

<b>Are you getting the value for p_monat in the selection screen?</b>

To be more clear -> Is there any value appearing for the parameter in the selection screen when the program is executed.

2) Please post the code until the select query.

The only reason I could presume is that the value getting cleared before the select query.

Regards

Kathirvel

Read only

Former Member
0 Likes
1,144

The select query is in At seelection screen.

I commented that out

and I wrote the same select query after

START-OF-SELECTION.

Now the value is coming what ever entered on the seleciton screen.