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: 

Adding a Z Field onto an SAP Std Screen

Former Member
0 Kudos

Hello Experts,

I need to add my own Z field onto an SAP Std screen. The Z field already exist in the Append stucture of the table VBAK.

How to do this? Will it come under a screen exit or field exit?

May i know if i need to go for screen programming such as loop at screen..endloop. etc.

Please explain in Tech terms(code) wih an example.

Appreciate your response with points.

Thanks

Dan

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Hi Dan, where do you want to add this field, VA01/02/03? If so, then there are screens provided for you to modify and add your field. Here is the documentation.

http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm

From here, click User Exits, User Exits in Sales, User Exits in Sales Document Processing.

See the section labeled "User exits in the screens"

REgards,

RIch Heilman

9 REPLIES 9

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Hi Dan, where do you want to add this field, VA01/02/03? If so, then there are screens provided for you to modify and add your field. Here is the documentation.

http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm

From here, click User Exits, User Exits in Sales, User Exits in Sales Document Processing.

See the section labeled "User exits in the screens"

REgards,

RIch Heilman

0 Kudos

Hi,

Sub: Iam facing problem with workflow in parked vendor invoice with the chaged

event.

When iam doing particular (Changing GL account, Cost Center, Amount) changes

in parked vendor invoice through t-code FBV2 then the Changed event of

business object FIPP is not getting triggered. If iam changing Invoice date

then the workflow is getting tirggered.

Can you help me, is there any configuration required or else how to check this

problem.

Please help me, Its urgent

Former Member
0 Kudos

Hi Sarath,

You need to post ur problem in a seperate thread.

thanks

Former Member
0 Kudos

Hi Dan

You give us more details, because there isn't only one solution. Which solution can be used depends on which program you need to change.

There are some trx (like VA01/2/3 or ME21N/2N/3N) they have some screen-exit to insert some new fields, but if your trx hasn't it you'll have to change directly the standard screen.

Max

Former Member
0 Kudos

Hi Rich,

Thanks for the response.

I need to capture the field in VA02. But how do i program/control the fields content on the screen at a given time so that i can influence other activites like update to the relevant tables?

Eg: if the content is 'abc' i will update ztable 1 else update ztable2..etc?

Please reply with an example.

Thanks

Dan

0 Kudos

<i> The Z field already exist in the Append stucture of the table VBAK.</i>

First, I thought that you wanted to update a custom field in VBAK?

If so, you can simply add the field to the appropriate screen mentioned in the documentation and name it as VBAK-ZZFIELD. It will then update VBAK. No addtional coding required.

If you want to update custom tables, you must implement your coding in the one of the FORM user exits, such as USER_EXIT_PREPARE_SAVE, I think that is the name.

Regards,

Rich Heilman

0 Kudos

Hi

Probably jst as Rich said you need to use the screen(exit) 8309 in order to display your new Z-FIELD.

Here you need only to design the dynpro using the structeu VBAK and the system'll automatically store

them in VBAK table.

If you need to store your data in Z-TABLE, yous should use the userexit USEREXIT_SAVE_DOCUMENT instead of

USEREXIT_SAVE_DOCUMENT_PREPARE:

- USEREXIT_SAVE_DOCUMENT_PREPARE: it's triggered before saving document,

- USEREXIT_SAVE_DOCUMENT: it's triggered while saving document.

Here you have to insert all abap code you need to update your z-table.

U should consider all saving are made in update tusk, so it should be better you create a z-function to update your z-table and call that fm in update tusk into USEREXIT_SAVE_DOCUMENT.

Max

Former Member
0 Kudos

Hi MAx,

You said:

1) Here you need only to design the dynpro using the structeu VBAK and the system'll automatically store them in VBAK table.

Could you please tell me the dynpr prog involved?

2) U should consider all saving are made in update task, so it should be better you create a z-function to update your z-table and call that fm in update tusk into USEREXIT_SAVE_DOCUMENT

What is the code to do the above. Pls explian.

Thanks

0 Kudos

Hi

1) Here you need only to design the dynpro using the structeu VBAK and the system'll automatically store them in VBAK table.

Could you please tell me the dynpr prog involved?

Use trx SE80:

- choose program option and insert 'SAPMV45A';

- Press display and open SCREEN node;

- Search screen 8309, do a doubleclick and press MODIFY: now you're in screen painter.

- To insert the input/output fields use the structure VBAK: in this way the headerline of VBAK'll automatically be filled. You need only to insert the code in screen flow (PBO and/or PAI) if you need to insert some controls;

2) U should consider all saving are made in update task, so it should be better you create a z-function to update your z-table and call that fm in update tusk into USEREXIT_SAVE_DOCUMENT

What is the code to do the above. Pls explian.

If you see the user-exit USEREXIT_SAVE_DOCUMENT you can see a example:

FORM USEREXIT_SAVE_DOCUMENT.
* Example:
* CALL FUNCTION 'ZZ_EXAMPLE'
*      IN UPDATE TASK
*      EXPORTING
*           ZZTAB = ZZTAB.
ENDFORM.                    "USEREXIT_SAVE_DOCUMENT

So you have to create a your function module with importing parameters structurated like your Z-table, in this way you can transfer the record you need to update/insert. In the fm you insert all code you need to do the updating/inserting:

FUNCTION 'ZZ_EXAMPLE'.
  MODIFY ZZTAB FROM ZZTAB.
ENDFUNCTION.

Max