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

About selection-screen's question?

Former Member
0 Likes
2,188

Dear gurus:

I have declare a screen like below:

SELECTION-SCREEN BEGIN OF BLOCK blk_d WITH FRAME TITLE text-004.

PARAMETERS: p_matnr TYPE resb-matnr. "Material

PARAMETERS: p_bdmng LIKE resb-bdmng. "Request Qty

PARAMETERS: p_meins LIKE resb-meins.

SELECTION-SCREEN END OF BLOCK blk_d.

How to achieve such an effect:

after i input a materical code to p_matnr, display the corresponding unit in p_meins.

Actually, when the user input the qty, them want know the unit of currently material. So i want show the unit in parameter(p_meins) after them input the p_matnr,but before them input the qty.

Message was edited by:

Shao Hui Young

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,813

Hi shao,

1. User has to press ENTER,

just after entering / selecting via F4,

the material number.

2. This is one way.

3. Just copy paste.

4.

REPORT ABC.

SELECTION-SCREEN BEGIN OF BLOCK BLK_D WITH FRAME TITLE TEXT-004.

PARAMETERS: P_MATNR TYPE RESB-MATNR. "Material

PARAMETERS: P_BDMNG LIKE RESB-BDMNG. "Request Qty

PARAMETERS: P_MEINS LIKE RESB-MEINS.

SELECTION-SCREEN END OF BLOCK BLK_D.

<b>*----


AT SELECTION-SCREEN OUTPUT.

SELECT SINGLE MEINS

INTO P_MEINS

FROM MARA

WHERE MATNR = P_MATNR.</b>

regards,

amit m.

Dear gurus:

I have declare a screen like below:

SELECTION-SCREEN BEGIN OF BLOCK blk_d WITH FRAME TITLE text-004.

PARAMETERS: p_matnr TYPE resb-matnr. "Material

PARAMETERS: p_bdmng LIKE resb-bdmng. "Request Qty

PARAMETERS: p_meins LIKE resb-meins.

SELECTION-SCREEN END OF BLOCK blk_d.

How to achieve such an effect&#65306;

after i input a materical code to p_matnr, display the corresponding unit in p_meins.

Actually, when the user input the qty, them want know the unit of currently material. So i want show the unit in parameter(p_meins) after them input the p_matnr,but before them input the qty.

Message was edited by:

Shao Hui Young

12 REPLIES 12
Read only

amit_khare
Active Contributor
0 Likes
1,813

Write the Code in AT SELECTION SCREEN OUTPUT.

When user enter the value in p_matnr and press enter the other screen will take corresponding data.

Only thing to handle here is an event.Because unless an event is triggered thos field will not get filled, if user is using F4 then it will trigger. But if he is entering manually then need to press enter.

Regards,

Amit

Reward all helpful replies.

Read only

0 Likes
1,813

Dear Amit:

Actually, when the user input the qty, them want know the unit of currently material. So i want show the unit in parameter(p_meins) after them input the p_matnr,but before them input the qty.

can I achieve??

Read only

Former Member
0 Likes
1,813

Hello Shao,

use the following logic....

at selection-screen output on p_matnr.

select single matnr meins from resb where matnr in p_matnr.

move resb-meins to p_meins.
modify screen.

Reward If Helpful.

Regards

--

Sasidhar Reddy Matli.

Read only

0 Likes
1,813

Hi Sasidhar:

I use the code which just you give me .

but the system give me a error like this: "." expected after output.

It seemed as if can't put "on p_matnr" after "at selection-screen output"

Reward all helpful advice!!

Read only

0 Likes
1,813

Hi Sasidhar:

Actually, when the user input the qty, them want know the unit of currently material. So i want show the unit in parameter(p_meins).

Read only

Former Member
0 Likes
1,813

Hi

<b>at selection-screen output on p_matnr.

select single matnr meins from resb where matnr in p_matnr.

move resb-meins to p_meins.

modify screen.</b>

reward if usefull

Read only

0 Likes
1,813

Hi Naresh:

Thanks for your advice first,

but it seem can't put the <font color=red>on p_matnr</font> after <font color=red>at selection-screen output </font>, my sap system give a error.

Read only

Former Member
0 Likes
1,813

hi,

try this code:

SELECTION-SCREEN BEGIN OF BLOCK blk_d WITH FRAME TITLE text-004.

PARAMETERS: p_matnr TYPE resb-matnr. "Material

PARAMETERS: p_bdmng LIKE resb-bdmng. "Request Qty

PARAMETERS: p_meins LIKE resb-meins.

SELECTION-SCREEN END OF BLOCK blk_d.

at selection-screen output.

select meins into p_meins from resb where matnr = p_matnr.

endselect.

plz reward points if it helps.

rgds.

Read only

Former Member
0 Likes
1,813

hi,

the code i pasted before & the one iam pasting now wuld give the same result.

u have to use ;

at selection-screen on p_matnr.

(if u use at selection-screen output on p_matnr u will get an error)

SELECTION-SCREEN BEGIN OF BLOCK blk_d WITH FRAME TITLE text-004.

PARAMETERS: p_matnr TYPE resb-matnr. "Material

PARAMETERS: p_bdmng LIKE resb-bdmng. "Request Qty

PARAMETERS: p_meins LIKE resb-meins.

SELECTION-SCREEN END OF BLOCK blk_d.

at selection-screen on p_matnr.

select single meins into p_meins from resb where matnr = p_matnr.

*move resb-meins to p_meins.

modify screen.

plz reward points if it helps.

Read only

0 Likes
1,813

Hi abaper :

Thk u first.

i have test your code, the unit will display after i push the execute button, But i want display the unit after i input the material code.

can l achieve?

Reward all helpful advice~

Read only

Former Member
0 Likes
1,814

Hi shao,

1. User has to press ENTER,

just after entering / selecting via F4,

the material number.

2. This is one way.

3. Just copy paste.

4.

REPORT ABC.

SELECTION-SCREEN BEGIN OF BLOCK BLK_D WITH FRAME TITLE TEXT-004.

PARAMETERS: P_MATNR TYPE RESB-MATNR. "Material

PARAMETERS: P_BDMNG LIKE RESB-BDMNG. "Request Qty

PARAMETERS: P_MEINS LIKE RESB-MEINS.

SELECTION-SCREEN END OF BLOCK BLK_D.

<b>*----


AT SELECTION-SCREEN OUTPUT.

SELECT SINGLE MEINS

INTO P_MEINS

FROM MARA

WHERE MATNR = P_MATNR.</b>

regards,

amit m.

Read only

Former Member
0 Likes
1,813

hi,

ive already given the code in my first post .

SELECTION-SCREEN BEGIN OF BLOCK blk_d WITH FRAME TITLE text-004.

PARAMETERS: p_matnr TYPE resb-matnr. "Material

PARAMETERS: p_bdmng LIKE resb-bdmng. "Request Qty

PARAMETERS: p_meins LIKE resb-meins.

SELECTION-SCREEN END OF BLOCK blk_d.

at selection-screen output.

select meins into p_meins from resb where matnr = p_matnr.

endselect.

when the user hits enter key the value for meins is displayed.

plz reward points if it helps

rgds