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: 

Screen exit (VA42) Additional Data B screen

Former Member
0 Kudos
516

Hello all,

I have created a button on additional data B screen of a contract (VA42) and have written code in its PAI to update some database tables.

The update takes place properly but after clicking the button the screen goes in display mode and gives the error message as 'Requested function SET is not available here'. (SET is the function code of the btn created)

Please suggest some solution for this.

thanks in advance.

Regards,

Neelambari.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
167

Hi,

Before clicking the button just put /h and see what the function code is....imagine it to be FXN

after you write your code in PAI to check the button for sy-ucomm..do your actions and put the value back in there

ie sy-ucomm = FXN.

fcode = FXN.

The reason is that ..additional dataB subscreen is called from a main screen and after the control goes back to the main screen our custom function codes are not recognised..

so in the PAI after you finish processing your custom sy-ucomm do the following

case sy-ucomm.

When 'SET'.

write code to do the required action

sy-ucomm = 'FXN'.

fcode = 'FXN'.

endcase.

Although it causes no further complications i wouldn't totally agree that it is the best way but again....it does the job....

Reward if helpful

Regards

Byju

3 REPLIES 3

Former Member
0 Kudos
167

Hi Neelambari,

Please refer to the reply what I have given to one of the Vikki ram's posts. It was very much useful for him.

[]

The same reply for your convenience I'm pasting below.

Hi Vikki,

I have also done similar kind of object which was the heart of one of my project. I need to replicate the Item Level Billing plan tab onto the Additional B tab including the buttons contained and other such requirement. I have implemented all the functionality as specified but not the Button functionality. I have researched, debugged a lot and came to final conclusion that we can't place our own buttons on Standard SAP screens and interact with them and achieve the requirement. The reasons are as follows.

1. Because it is SAP provided screen whatever FCodes that we interact with, they are being validated against the tables T185, T185F etc...

2. It gave me the error Flow Control XXXXXXXXXXXXXXXXXXXXXXXXXXX is missing in table T185

3. This FCode validation will happen in Module FCODE_BEARBEITEN by taking into account the program name, FCode etc.

4. The error is getting triggered in the perform T185F_LESEN

5. In this perform first the following Statement is validated.

Select single * from T185F where AGIDV EQ T185F-AGIDV and

TRTYP EQ T185F-TRTYP and FCODE EQ T185F-FCODE.

6. The above statement is returning SY-SUBRC = 4. and then the following statement is getting validated.

7. Select single * from T185F where AGIDV EQ T185F-AGIDV and

TRTYP EQ '*' and FCODE EQ T185F-FCODE.

8. After the above stmt it is returning the error message 'Requested Function XXXX is not available here'

Reward accordingly.

Thanks and Regards,

Maddineni Bharath.

Former Member
0 Kudos
168

Hi,

Before clicking the button just put /h and see what the function code is....imagine it to be FXN

after you write your code in PAI to check the button for sy-ucomm..do your actions and put the value back in there

ie sy-ucomm = FXN.

fcode = FXN.

The reason is that ..additional dataB subscreen is called from a main screen and after the control goes back to the main screen our custom function codes are not recognised..

so in the PAI after you finish processing your custom sy-ucomm do the following

case sy-ucomm.

When 'SET'.

write code to do the required action

sy-ucomm = 'FXN'.

fcode = 'FXN'.

endcase.

Although it causes no further complications i wouldn't totally agree that it is the best way but again....it does the job....

Reward if helpful

Regards

Byju

Former Member
0 Kudos
167

issue closed