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

Create / insert data to vbap via additional tab B

Former Member
0 Likes
5,381

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,142

Hi,

Have to checked name of the field on screen and corresponding name of field in appended structure? Is it same?

Regards,

Kunal

24 REPLIES 24
Read only

hemanth_kumar21
Contributor
0 Likes
5,142

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

Read only

0 Likes
5,142

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.

         

    

    

Read only

0 Likes
5,142

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

Read only

0 Likes
5,142

i deed that before.

But don't find any data in zzfield of VBAP !!!

Read only

0 Likes
5,142

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

Read only

0 Likes
5,142

Hi,

I deed it via tcode SE51, screen painter:

Read only

0 Likes
5,142

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

Read only

0 Likes
5,142

I added my zzfield(zztrannsport) in a structure that already exist in VBAP:

Read only

0 Likes
5,142

Wrong.

It shoud be table VBAP and then the field

Regards

Read only

0 Likes
5,142

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

Read only

0 Likes
5,142

Hi,

So check name of input field it should be - VBAP-ZZTRANSPORT.. Also attributes of field should match.

Read only

Former Member
0 Likes
5,143

Hi,

Have to checked name of the field on screen and corresponding name of field in appended structure? Is it same?

Regards,

Kunal

Read only

0 Likes
5,142

When i do F1, in the zzfield(transport) i find the description of the zzfield is

is that correct ?

Read only

0 Likes
5,142

No...

it is not correct..

It must be VBAP-ZZTRANSPORT...

You must change it on the screen 8459

Regards

Miguel

Read only

0 Likes
5,142

Yes, that was the fout.

I should write Vbap-zztransport and not zzDEAVBAP-zztransport.

Thank u very much for your helps.

Read only

0 Likes
5,142

yes Miguel.

Thank u very much.

Read only

0 Likes
5,142

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 ?

Read only

0 Likes
5,142

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

Read only

0 Likes
5,142

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 ?

Read only

0 Likes
5,142

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

Read only

0 Likes
5,142

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.

Read only

0 Likes
5,142

Hi Miguel,

when i active all the program SAPMV45A, i receive the following error :

Do you have any idea ?

Read only

0 Likes
5,142

no idea ?

Because the program dump now ..

Read only

0 Likes
5,142

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