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

SO Additional Data B Enhancement

Former Member
0 Likes
20,046

Hi Gurus,

As per required we have enhanced SD screens in VA01/02..etc and added the Additional Data B tab subscreen, its now full and we need to add more fields but due to the screen size limitations we cannot, so i'm trying to add a push button on Additional Data B subscreen and open a new scree (Dialog or Normal) and place my new fields there. of course i have to add the Function Code of the button and enhance the User Exits of both PBO & PAI.

still even when doing so i'm getting the following error 'Requested Function 'FunCode' is not available here'.

Ok Code of this new screen i'm using the same one as FCODE as in SAP Standard screen 4002 for example.

Why is the report not recognizing the new screen despite its type (normal or Dialog), can we do this approach?

Regards.

Hi Gurus,

As per required we have enhanced SD screens in VA01/02..etc and added the Additional Data B tab subscreen, its now full and we need to add more fields but due to the screen size limitations we cannot, so i'm trying to add a push button on Additional Data B subscreen and open a new scree (Dialog or Normal) and place my new fields there. of course i have to add the Function Code of the button and enhance the User Exits of both PBO & PAI.

still even when doing so i'm getting the following error 'Requested Function 'FunCode' is not available here'.

Ok Code of this new screen i'm using the same one as FCODE as in SAP Standard screen 4002 for example.

Why is the report not recognizing the new screen despite its type (normal or Dialog), can we do this approach?

Regards.

31 REPLIES 31
Read only

Lakshmipathi
Active Contributor
0 Likes
18,545

Moved from SAP ERP SD Sales to ABAP Development.   Please post your query in the right forum to get the right direction.

Read only

sachin_yadav3
Active Participant
0 Likes
18,545

You can use additional tab A also for custom fields.

Read only

0 Likes
18,545

We Already Have Additional Data A & B, so according to you and the rest of the gurus below this should be a new one like Additional Data C

Read only

Former Member
0 Likes
18,545

Muhja,

You are over complicating the requirement. If there is no space in tab B, simply create a new subscreen. You dont have to create a push button to do open a new screen.

Just google on how to create a new subscreen on sales order.

Thanks,

Vikram.M

Read only

0 Likes
18,545

I'll try this and let you know, thanks

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
18,545

Can you post a screenshot? To be honest, if the screen is stuffed full I suspect it's a just bad design / ZSAP.

Read only

0 Likes
18,545

Hi Jelena,

you can see below is the screen, (i don't think its bad design as these are required in the SO) but due to screen size limitations its not possible to add any more to the right side of the screen in Additional Data B.

Read only

Former Member
0 Likes
18,543

1. you can add new tab for example blabla addtional data (you can find the image top),

2. if you have to add in additonal data B so you should use tabstrip method (you can find the image bottom)

Read only

Former Member
0 Likes
18,543

Hi Muhja,

You have to perform configuration of your new Function Code in Transaction VFBS. This is for Screen controls. Check whether you have done this or not ...

Regards,

Praphul

Read only

0 Likes
18,543

Hi Singh,

Can you please share the method to do this? do you have a link or a guide of sort?

regards.

Read only

0 Likes
18,543

Hi Muhja,

Provide program name as SAPMV45A in transaction and follow each radio button step by step .

Its not that simple. I don't have any document with me right now.

You can check whether some Z- Function code is already configured in your system then take that as reference. or search for VFBS transaction configuration.

Regards,

Praphul Singh

Read only

0 Likes
18,543

Hi Singh,

Thanks I'm trying the same but still getting the 'Request Function 'ZXXX' is not available here'.

I was meaning to add a tab as Additional Data and append the new fields as structure on VBAK but our VBAK table is already huge and any additional fields will only slow other processes related to this table. so i would like to have this dialog activated, i can call it alright but when clicking enter to go back i get the error message.

Thanks & regards.

Read only

0 Likes
18,543

Hi Muhja,

I searched in SCN and got some links . Please have a look.

Screen Fields | SCN

Additional (custom) header tab at VA0x using VF... | SCN

Hope this will resolve your issues.

Regards,

Praphul

Read only

0 Likes
18,543

Hi Praphul,

thanks again, the links are really useful but now i'm facing a dump when i get to the main screen 4002, as attached, i'm debugging and can see that FCODE has the value as 'BACK' which should be maintained for the main standard screen.

Regards.

Read only

0 Likes
18,543

Hi Muhja,

Do let me know what changes you did in Transaction VFBS. If you have not maintained you Function code in VBFS then which method are you following and also when you attached the Dump , Please attach with the program name and code where the dump came.

Regards,

Praphul

Read only

0 Likes
18,543

Hi Muhja,

In Screen 8309 of Program SAPMV45A for additional data tab, Add a module in PAI . In this module, write logic to call a custom FM as below. here 'ZFCD' is your custom function code and pass order related data which you can use in FM, then make fcode = HEAD.

  IF fcode EQ 'ZFCD'.

    CALL FUNCTION 'ZTEST'

      EXPORTING

        i_import       = wa_import.

    fcode = 'HEAD'.

  ENDIF.

In FM you can call custom Screen, like CALL SCREEN 200 and do your operation here.

and in PAI for this custom screen , in module user_command_200

When 'BACK'

clear : ...

LEAVE SCREEN.

let me know if you face any issue.

Regards,

Praphul

Read only

0 Likes
18,543

Hi Praphul,

I have made changes in VFBS as in provided link:

Screen Fields | SCN

1- Program SAPMV45A, Function Codes T185F, Fcode = Z1GX

2- Program SAPMV45B, Function Codes T185F, Fcode = Z1GX

3- Paths between process & locations, T185 i added both SAPMV45A & SAPMV45B Fcode = Z1GX

Saved,

Changes made must take effect on (VA01/02/03), so from screen 4002 there is the Additional Data B

subscreen 8309 which i added the push button on it with Fcode Z1GX.

The Dump was shown when I'm trying to go back to the main screen on VA01 from Additional Data B to Header section.

Steps above helped to remove the error 'Request Function 'Z1GX' is not available here'. but the dump shows after when i want to go back to the main screen of VA01.

I will try below code and let you know if solved, many thanks.

Regards.

Read only

0 Likes
18,543

Hi Mujha,

No need to try the code now.

Just let me know, when you click the button, your custom screen is coming correctly or not. Then when you navigate back to additonal data tab is it coming perfectly or not. Problem is when you are clicking back when you are in additional data tab ? .

Also pls. attach the Dump header lines where program name , exception etc is written and the code where it has dump >> sign.

Regards,

Praphul

Read only

0 Likes
18,543

Hi Muhja,

You can put break-point in Two FM 'FUNCTION_EXECUTE' and FM 'SCREEN_SEQUENCE_CONTROL', to check whether T185, T185V and other related data are coming correctly.

Regards,

Praphul

Read only

0 Likes
18,542

Hi Praphul,

to answer each point:

Just let me know, when you click the button, your custom screen is coming correctly or not?

yes it calls it correctly (its a dialog screen by the way)

Then when you navigate back to additional data tab is it coming perfectly or not?

yes it navigates back to Additional Data tab perfectly, no issues here.

Problem is when you are clicking back when you are in additional data tab ?

yes when i click 'Back' on Additional Data tab to go to the Header screen (previous screen) it gets the dump.

Regards.

Read only

0 Likes
18,542

Hi Praphul,

After using the screen PAI approach and putting Value of FCODE as 'HEAD' it solved the Dump problem, so now I'm going to complete my requirements logic and see if it updates correctly or not, many thanks for your help, saved my life so far

regards.

Read only

0 Likes
18,542

Hi,

Muhja,

Are you still facing any issues ?

Regards,

Praphul

Read only

0 Likes
18,542

Hi Praphul,

No issues so far, I'm trying to save my new field values in my new Custom ztable at the same time when the SO will be saved in VBAK, where can I maintain that in PAI?

Is There an event provided for it?

Another thing too, the custom defined screen has fields in it that I'm filling with Data, so now under MV45AFZZ I'm calling these screen fields with their names but it is giving me an error that the object is no defined. Even after defining the objects in the exit its not reading the Data from the screen.

How/Where can you map the values from Screen Element in MV45AIZZ to MV45AFZZ (to enable the saving process at the same time as the SO)?

Thanks & regards.

Read only

0 Likes
18,542

Hi Mujha,

In Screen 8309, you are calling a custom FM to call your custom screen as I told you earlier. you just import the value into the FM and move that to VBAK-ZFEILD and XVBAK-ZFIELD.

Let me know in case of any further issues.

reward point if your issue is resolved.

regards,

Praphul

Read only

0 Likes
18,542

Hi Praphul,

Thanks for your support.

New fields ZFILED1 & ZFIELD2 are not included in VBAK (as its already packed with appended structures which causing issues), that is why I have created a new custom table to Insert/Update on while dealing with SO in VA01/02.

Is there a way where I can reference the fields on the custom screen in the include/user exit?

Regards.

Read only

0 Likes
18,542

Hi Muhja,

You can update the custom Z-table in your custom screen using FM and call this FM in update task .

CALL FUNCTION... IN UPDATE TASK.


Regards,

Praphul

Read only

0 Likes
18,542

Hi Praphul,

This is really useful, its saving in my custom table but its not getting any value in VBAK-VBELN its coming as initial, is there anyway that I can connect the custom screen entries with the SO before creation?

If the code is added on my custom screen (which is the case) its going to pass everything except for the VBELN. and if Add the code in MV45AFZZ at the save event to get the VBELN it will update the table but with no Additional custom screen fields values (as its not known on this layer).

Regards.

Read only

0 Likes
18,542

Hi Muhja,

You can export the value of custom fields as work area in Database Index memory Table INDX and import that in MV45AFZZ and update the Z-table with custom values along with VBELN.

Regards,

Praphul

Read only

0 Likes
18,542

Hi Praphul,

This is great, any link or guide to do this? I'm new to the Index approach.

many thanks

Read only

0 Likes
18,542

Please check below link:

Import and Export to Cluster Databases - Code Gallery - SCN Wiki

check the logic in section 1.4 , If you don't want to use class for deletion then you can do that by Delete command as mentioned there.

you have to export from custom screen, then import where you want to update the custom table and after successful import you have to delete it .

Regards,

Praphul

Read only

0 Likes
18,542

Hi Praphul,

Thank you so much for sharing this, it really solved my problem, its working great now.

appreciate your support,

Thanks a million,

Regards.