cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance Business Partner S4Hana

lfrey91
Participant
0 Kudos

Hello all,

i try to enhance the transaction BP.

I already know the transactin BUPT.

I already got an extra view and the Z-Fields.

But when i change the content of a z-field, it always displays the old content after saving.

In the transaction BUS3 you customize the fuba for PBO and the fuba for PAI.

I think my fuba for the PAI is not coreckt.

Any Idea? (In the Guides i found everybody enhances the KNA1, i enhanceed the BUT000. could this be the error?)

My Coding:

FUNCTION ZSD_BUT000_PAI.

*"----------------------------------------------------------------------

*"*"Lokale Schnittstelle:

*"----------------------------------------------------------------------



*Im Dynprofeld steht der neue Wert

*BUT000-ZZLO_PUNZART



data: lt_but000   type table of but000,

      ls_but000 like LINE OF lt_but000,

      lt_messages     type bapiret2_t.



  field-symbols:

    <but000>          like line of lt_but000.



constants: lc_bdt_view TYPE bu_sicht value 'ZT_E2',

           lc_dynp_struc   type fsbp_table_name value 'BUT000'.



check cvi_bdt_adapter=>is_direct_input_active( ) = false.



* step 1: update xo memory from dypro structure

  cvi_bdt_adapter=>get_current_bp_data(

    exporting

      i_table_name = table_name_but000

    importing

      e_data_table = lt_but000[]

  ).



IF lt_but000[] is INITIAL.



else.



  read TABLE lt_but000 ASSIGNING <but000> INDEX 1.

  <but000>-zzlo_punzart = but000-zzlo_punzart.



ENDIF.



  cvi_bdt_adapter=>data_pai(

    i_table_name = table_name_but000

    i_data_new   = lt_but000[]

    i_validate   = false

  ).

Accepted Solutions (0)

Answers (5)

Answers (5)

MassimoX
Participant
0 Kudos

i had found better way:

IF but000 NE ls_but000_old.
 CALL FUNCTION 'BUP_BUPA_BUT000_GET' 
      IMPORTING
        e_but000 = l_but000.    

 IF NOT l_but000 IS INITIAL.  

     l_but000-zzfield = but000-zzfiled.

    CALL FUNCTION 'BUP_BUPA_BUT000_COLLECT'
        EXPORTING
          i_subname = 'BUT000'
          i_but000  = l_but000.
 ENDIF.
ENDIF
lfrey91
Participant
0 Kudos

Coding pic 3

Andreas_Lackner
Explorer
0 Kudos

Hello,

I am struggeling with the same problem.

What exactly did you change in BUS7?

How does the implemantion of the function modules look like?

Thank you in advance. Andreas

lfrey91
Participant
0 Kudos

Hi Andreas...

found my small Doc. Hope this helps..

BUS7: ( Hier können wir in der Transaktion BP auf unterschiedlichste Zeitpunkte Reagieren)

In unserem Fall benötigen wir den Zeitpunkt:

DSAVE

Wir legen hier einen neuen Satz an mit einem neuen FUBA. Diesen packen wir wieder in unsere Funktionsgruppe.

  • Die Anwendung ist die Anwendung aus BUS3.

lfrey91
Participant
0 Kudos

solved it:

BUS7 is the right Transaction

lfrey91
Participant
0 Kudos

I found a nice blog.

https://blogs.sap.com/2013/12/31/fscm-additional-tab-to-business-partner-through-bdt-settings/

BUS7

But i dont know what i have to code in the two fubas. 😕