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

Pushbutton - Function Code

Former Member
0 Likes
1,414

Hi All,

I had a situation where I had no choice(Enhancment QQMA0001 - Screen 0140) but to assign two PUSHBUTTON's same function code and need to points to different screens.

Need to have a way to see which one is clicked and then call correspoding screen.

Thanks

L

8 REPLIES 8
Read only

Former Member
0 Likes
1,140

A tricky solution: make a small table control with one column in which your two pushbutton will be there.

then you will come to know the button on which, user has clicked by the FM - DYNP_GET_STEPL.

then you can write your code to perform requied thing accordingly.

Thanks

Yogesh Gupta

Read only

Former Member
0 Likes
1,140

Is this function code captured in your code or SAP standard code?

Can you provide more details, ma be we can help...

Thanks,

Barjinder Singh.

Read only

0 Likes
1,140

Hi,

SAP had defined only 3-4 Function codes to be used in the Enhancement object , which I had already Used . Now due to business needs I need to create more screens which will be called based on this New Push buttons.

Inshort I cannot create any custom Function codes to the Push button as SAP says Z??? is not allowed function code in the program (msg V0104)

Thank

L

Read only

0 Likes
1,140

Are all these 3-4 function codes defined on the same screen...just a thought if flagging can help.....

Thanks,

Barjinder...

Read only

0 Likes
1,140

Yes, I had already used Functional code namely +US2, U01,U03,U02, +US1, defined in LIQS0TPC)include) of SAPLIQS0. Now need to add one more push button for specific Job to be performed, will will open a new Dialog screen.

Thanks

L

Read only

0 Likes
1,140

Hi,

If you can find any differentiator between the two functionalities, you can do it by setting the flag, like if flag = 'X' do this else do this.

If you can set the flag in your code(i don't know your code) and then check for the value of this flag during the exection of the function code, you can do this.

Hope it helps.

Thanks,

Barjinder Singh.

Read only

0 Likes
1,140

Hi Friends,

Thanks a lot for your help. But the solution to this problem lies in Pm Config.

SAP Says, we need to assign more than one custom screen we need to assign 091 as the screen area and enter the screen no for each screen.

config point is

Plant Maintenance and service processing >Maintenance & Service Processing>Maintenance & Service Notifications -->Notification Creation >NotificationTypesSet screen templates for notification types.

No need to for any MOD.

Edited by: Lakhbir Singh on Jul 21, 2008 12:46 PM

Read only

Former Member
0 Likes
1,140

hi check this..

REPORT ZSELECTIONSCREEN001.

tables:mara,

marc,

mard,

sscrfields.

data: begin of it_mara occurs 0,

matnr like mara-matnr,

meins like mara-meins,

mtart like mara-mtart,

pstat like mara-pstat,

ernam like mara-ernam,

end of it_mara.

selection-screen begin of screen 100 as subscreen.

selection-screen begin of block b1 with frame title text-001.

select-options:matno for mara-matnr.

selection-screen end of block b1.

selection-screen end of screen 100.

selection-screen begin of screen 200 as subscreen.

selection-screen begin of block b2 with frame title text-002.

select-options:industry for mara-meins.

selection-screen end of block b2.

selection-screen end of screen 200.

selection-screen begin of screen 300 as subscreen.

selection-screen begin of block b3 with frame title text-003.

select-options:mattype for mara-mtart.

selection-screen end of block b3.

selection-screen end of screen 300.

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK SUB FOR 15 LINES,

END OF BLOCK SUB.

initialization.

SSCRFIELDS-FUNCTXT_01 = '@0D@'.

SSCRFIELDS-FUNCTXT_02 = '@0E@'.

SUB-PROG = SY-REPID.

SUB-DYNNR = 100.

AT SELECTION-SCREEN.

CASE SY-DYNNR.

WHEN 100.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 300.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 200.

ENDIF.

WHEN 200.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 100.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 300.

ENDIF.

WHEN 300.

IF SSCRFIELDS-UCOMM = 'FC01'.

SUB-DYNNR = 200.

ELSEIF SSCRFIELDS-UCOMM = 'FC02'.

SUB-DYNNR = 100.

ENDIF.

ENDCASE.

START-OF-SELECTION.

select matnr

meins

mtart

pstat

ernam

from mara

into table it_mara

up to 100 rows

where matnr in matno.

loop at it_mara.

write:/ it_mara-matnr,

it_mara-meins,

it_mara-mtart,

it_mara-pstat,

it_mara-ernam.

endloop.

regards,

venkat.