Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3575

Re: va01/v02 custom tab

$
0
0

I had the same issue using BADI_SLS_ITEM_SCR_CUS with an append structure on VBAP (ZZVBAP_APPEND). I finally solved it. The key is to first implement the ACTIVATE_TAB_PAGE method (for which there are several nice sets of instructions online), but then to also implement the two TRANSFER* methods. Without coding those additional methods, the internal table that later does the database save is unaware of the data that was entered on the custom screen. I have a Function Group with a couple of Function Modules that I call from the BAdI methods. Here's the bare minimum that I put in those transfer methods to get the job done:

(1)   METHOD if_ex_sls_item_scr_cus~transfer_data_to_subscreen.   

           CALL FUNCTION 'ZTRANS_STD_SALES_ITEM_DATA'     

                EXPORTING         is_t180  = is_t180       

                                              is_rv45a = is_rv45a       

                                              is_vbak  = is_vbak       

                                              is_vbap  = is_vbap. 

       ENDMETHOD.   

 

       FUNCTION ztrans_std_sales_item_data.

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

       *"*"Local Interface:

       *"  IMPORTING

       *"    REFERENCE(IS_T180) TYPE  T180

       *"    REFERENCE(IS_RV45A) TYPE  RV45A OPTIONAL

       *"    REFERENCE(IS_VBAK) TYPE  VBAK

       *"    REFERENCE(IS_VBAP) TYPE  VBAP

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

       * Pull in entire current VBAP structure. We will update the

       * ZZ append fields during screen processing. Note: vbap is declared

       * via a tables statement in the top include for my function group,

       * and all my screen fields are vbap-zz*.    

 

             vbap = is_vbap.  

       ENDFUNCTION.

____

(2)   METHOD if_ex_sls_item_scr_cus~transfer_data_from_subscreen.   

           CALL FUNCTION 'ZTRANS_CUST_SALES_ITEM_DATA'   

               EXPORTING       is_t180    = is_t180   

               CHANGING       cs_vbap    = cs_vbap.   

 

           ev_dataloss = space. 

        ENDMETHOD.   

 

        FUNCTION ztrans_cust_sales_item_data.

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

        *"*"Local Interface:

        *"  IMPORTING

        *"    REFERENCE(IS_T180) TYPE  T180

        *"  CHANGING

        *"    REFERENCE(CS_VBAP) TYPE  VBAP

        *"    REFERENCE(CV_FCODE) TYPE  FCODE OPTIONAL

        *"    REFERENCE(CS_RV45A) TYPE  RV45A OPTIONAL

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

        * Output subscreen vbap structure to cs_vbap to retain custom field values   

 

             cs_vbap = vbap. 

        ENDFUNCTION.


Viewing all articles
Browse latest Browse all 3575

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>