2013 Nov 07 1:03 PM
Hello,
I added a zzfield in the additional Tab B and in the appended structure for VBAP:
But when a click to Save i don't find data in my table VBAP:
Some can help me to write the exact abap code to save data from additional tab B to the table VBAP. ?
And also in wish user-exit i have to do that?
Thank u very much.
2013 Nov 07 1:49 PM
Hi,
Have to checked name of the field on screen and corresponding name of field in appended structure? Is it same?
Regards,
Kunal
2013 Nov 07 1:09 PM
Hi,
Open the program SAPMV45A from SE38 and open the INCLUDE MV45AFZZ
(A) Use this section to modify the custom table created by you, if required.
FORM USEREXIT_SAVE_DOCUMENT.
*** Write your own requirement here, if you want to store data in your ztable
ENDFORM.
(b) Use this section to prepare the line item before document is saved…*
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
*** Write your own requirement here
ENDFORM.
http://wiki.scn.sap.com/wiki/display/SI/Implementation+of+SAPV45A+User-exit+Screen
2013 Nov 07 1:16 PM
Thank u Modadugu for your replay.
But the code in this link http://wiki.scn.sap.com/wiki/display/SI/Implementation+of+SAPV45A+User-exit+Screen
shows how you can make this zzfield in display mode or change mode.
I need abap code to store data of zzfield in VBAP table.
2013 Nov 07 1:26 PM
Hi,
i think there is no special code necessary. If you fill you Z-Field and save than your
inserted value are stored. Try a look into table VBAP.
Regards, Dieter
2013 Nov 07 1:36 PM
i deed that before.
But don't find any data in zzfield of VBAP !!!
2013 Nov 07 1:41 PM
Hi,
can you show how do you create the field on the Screen.
i have done it für VBAK and it Looks like this:
Regards, Dieter
2013 Nov 07 1:45 PM
2013 Nov 07 1:46 PM
Hi.
Check the name of the input field that you add on the screen, should like VBAP-ZZFIELD.
There is not extra code to add.
Regards
Miguel
2013 Nov 07 1:53 PM
I added my zzfield(zztrannsport) in a structure that already exist in VBAP:
2013 Nov 07 1:55 PM
2013 Nov 07 1:56 PM
Hi,
has the field in the Screen also the databasefielde: VBAP-ZZTRANSPORT.
Goto the screendefinition. Layout and with attributes on your field.
Have a look on what i have done in my field (VBAK-ZZKUN0).
Regards, Dieter
2013 Nov 07 1:59 PM
Hi,
So check name of input field it should be - VBAP-ZZTRANSPORT.. Also attributes of field should match.
2013 Nov 07 1:49 PM
Hi,
Have to checked name of the field on screen and corresponding name of field in appended structure? Is it same?
Regards,
Kunal
2013 Nov 07 2:37 PM
When i do F1, in the zzfield(transport) i find the description of the zzfield is
is that correct ?
2013 Nov 07 2:40 PM
No...
it is not correct..
It must be VBAP-ZZTRANSPORT...
You must change it on the screen 8459
Regards
Miguel
2013 Nov 07 2:41 PM
Yes, that was the fout.
I should write Vbap-zztransport and not zzDEAVBAP-zztransport.
Thank u very much for your helps.
2013 Nov 07 2:41 PM
2013 Nov 07 2:50 PM
Hi Miguel,
I create this zzfield, but it is always in change mode, also when i do va03 for display.
Do you know how can do this field in diplay mode when tcode = va03 ?
2013 Nov 07 2:55 PM
yeap,
you must create a module on the screen and then add this code insde the module
LOOP AT SCREEN.
IF screen-name CS 'VBAP-ZZ'.
IF sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
screen-input = 1.
ELSE.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards
Miguel
2013 Nov 07 3:02 PM
Thank u,
When i want to create the module, they ask to save this module in a include like hier:
In wish include i have to save ? just the main program ?
2013 Nov 07 3:02 PM
Hi Miguel,
i think it's better to use this:
IF T180-TRTYP = 'A' "DISPLAY
AND SCREEN-NAME = 'VBAP-ZZTRANSPORT'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
Because there are more tcodes like VA21/VA22.
Regards, Dieter
2013 Nov 07 3:05 PM
Hi,
it works on va21, va22 and va23
and also, it works better this way if you add new fieds, no need to do anything else. using your way, everytime that need to add a new field, you must change the code.
Regards
Miguel
P.D: Talent..Talent...create a new include.
2013 Nov 07 3:19 PM
Hi Miguel,
when i active all the program SAPMV45A, i receive the following error :
Do you have any idea ?
2013 Nov 07 3:42 PM
2013 Nov 07 4:37 PM
Hi.
The MODULE should be created on MV45AOZZ include.
***INCLUDE MV45AOZZ .
* *
* This include is reserved for user modifications *
* *
* PBO Modules for sales document processing *
* *
* The name of modification modules should begin with 'ZZ'. *
* *
Regards
Miguel