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

BAPI_BATCH_CHANGE

Former Member
0 Likes
1,009

Hi everybody, I am trying to modificate the expiration date of a batch of a material with the BAPI_BATCH_CHANGE function module, in the se37 transaction it works fine, but when i use it in the program the system show me a run time error.

Runtime Errors CALL_FUNCTION_CONFLICT_LENG

Except. CX_SY_DYN_CALL_ILLEGAL_TYPE

But I think that the types are ok, somebody had the same problem? Regards

5 REPLIES 5
Read only

Former Member
0 Likes
863

Hi,

when you are passing parameters tot his bapi ensure that the data type of the parameters that you are passing is same as the data type in the bapi definition.

go to se37 and see the data type of each and every import, export parameter and use the same type in ur program

Thanks

mahesh

Read only

0 Likes
863

REPORT ZUPDATE_TEST2.

Data:

T_BATCHATTRIBUTES type standard table of BAPIBATCHATT,

TE_BATCHATTRIBUTES type BAPIBATCHATT,

*EXPIRYDATE is a component of BAPIBATCHATT Structure.

TE_BATCHATTRIBUTES-EXPIRYDATE = ‘11/03/2005’.

append TE_BATCHATTRIBUTES to T_BATCHATTRIBUTES.

T_BATCHATTRIBUTESX type standard table of BAPIBATCHATTX,

TE_BATCHATTRIBUTESX type BAPIBATCHATTX.

*EXPIRYDATE is a component of BAPIBATCHATTX Structure.

TE_BATCHATTRIBUTESX-EXPIRYDATE = 'X'.

append TE_BATCHATTRIBUTESX to T_BATCHATTRIBUTESX.

CALL FUNCTION 'BAPI_BATCH_CHANGE'

EXPORTING

MATERIAL = 'AF126-2_DEMO'

BATCH = '0000000147'

PLANT = '2010'

BATCHATTRIBUTES = T_BATCHATTRIBUTES

BATCHATTRIBUTESX = T_BATCHATTRIBUTESX.

  • BATCHCONTROLFIELDS =

  • INTERNALNUMBERCOM =

  • EXTENSION1 =

  • MATERIAL_EVG =

  • IMPORTING

  • BATCHATTRIBUTES =

  • TABLES

Read only

Former Member
0 Likes
863

Have you checked that the parameters that your are passing to the FM are the same as in SE37?

Greetings,

Blag.

Read only

0 Likes
863

I think that the parameters that i am using are ok, see the code:

REPORT yff_pruebas.

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.

Read only

Former Member
0 Likes
863

Answered