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

Configure variant records using FM 'MATERIAL_SAVE_CONFIGURATION'

$
0
0

Hi All,

 

I have a problem to configure variant records using FM 'MATERIAL_SAVE_CONFIGURATION'

 

I already write a program to configure variant records as below, but its not working,

 

     lt_e1cuval-charc = gw_details-atnam01.

     lt_e1cuval-value = gw_details-atwrt01.

     APPEND lt_e1cuval.

     lt_e1cuval-charc = gw_details-atnam02.

     lt_e1cuval-value = gw_details-atwrt02.

     APPEND lt_e1cuval.

     lt_e1cuval-charc = gw_details-atnam03.

     lt_e1cuval-value = gw_details-atwrt03.

     APPEND lt_e1cuval.

     lt_e1cuval-charc = gw_details-atnam04.

     lt_e1cuval-value = gw_details-atwrt04.

     APPEND lt_e1cuval.

     lt_e1cuval-charc = gw_details-atnam05.

     lt_e1cuval-value = gw_details-atwrt05.

     APPEND lt_e1cuval.


*  2. Save Configuration with FM MATERIAL_SAVE_CONFIGURATION at client

*  and Plant level.

 

*---------- Client-specific configuration--------------------------------------

     CALL FUNCTION 'MATERIAL_SAVE_CONFIGURATION'

       EXPORTING

         material       = gw_details-matnr

                                            " conf_matl      = lv_matnr

       TABLES

         e1cucfg        = lt_e1cucfg

         e1cuins        = lt_e1cuins

         e1cuval        = lt_e1cuval

         e1cucom        = lt_e1cucom

         returnmessages = gt_returnmessages.


     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.


*-----------Plant-specific configuration-----------------------------------------

*---Save the configuration for each plant-----------------------------------

     CALL FUNCTION 'MATERIAL_SAVE_CONFIGURATION'

       EXPORTING

         material        = gw_details-matnr

         plant           = gw_details-werks     "iv_plant

         conf_matl_plant = gw_details-stdpd

       TABLES

         e1cucfg_w       = lt_e1cucfg

         e1cuins_w       = lt_e1cuins

         e1cuval_w       = lt_e1cuval

         e1cucom_w       = lt_e1cucom

         returnmessages  = gt_returnmessages.

 

     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.



Below shows the screenshot for the error message,

error1.PNG

Results:

result1.png

Please assist,


Regards,

Liyana

 


Viewing all articles
Browse latest Browse all 3548

Trending Articles