DATA: t_batchattributes TYPE STANDARD TABLE OF bapibatchatt,
te_batchattributes TYPE bapibatchatt,
t_batchattributesx TYPE STANDARD TABLE OF bapibatchattx,
te_batchattributesx TYPE bapibatchattx.
DATA: wt_ret TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
w_lines TYPE i,
w_bapibatchatt TYPE bapibatchatt,
wa_bapibatchatt TYPE bapibatchatt,
w_matnr TYPE matnr,
w_charg LIKE lqua-charg,
w_fecha type vfdat.
w_fecha = sy-datum.
te_batchattributes-expirydate = w_fecha.
APPEND te_batchattributes TO t_batchattributes.
te_batchattributesx-expirydate = 'X'.
APPEND te_batchattributesx TO t_batchattributesx.
CALL FUNCTION 'BAPI_BATCH_CHANGE'
EXPORTING
material = w_matnr
batch = w_charg
batchattributes = t_batchattributes
batchattributesx = t_batchattributesx
IMPORTING
batchattributes = wa_bapibatchatt.
FUNCTION zerul_batch_change.
*"----------------------------------------------------------------------
*"*"Update Function Module:
*"
*"*"Local Interface:
*" IMPORTING
*" VALUE(MATNR) TYPE MATNR
*" VALUE(WERKS) TYPE WERKS_D
*" VALUE(CHARG) TYPE CHARG
*" VALUE(LIFNR) TYPE ELIFN
*" VALUE(LICHA) TYPE LICHN
*" EXCEPTIONS
*" ERROR
*"----------------------------------------------------------------------
DATA: ls_batchattributes TYPE bapibatchatt,
ls_batchattributes_new TYPE bapibatchatt,
ls_batchattributesx TYPE bapibatchattx,
ls_bapibatchkey TYPE bapibatchkey.
DATA: l_return_tab LIKE bapiret2 OCCURS 10 WITH HEADER LINE.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.