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

Values not clearedoff in standard BAPI

Former Member
0 Likes
766

Hi All,

I am having a program which updates Kanban Control Cycle in mass.

I am calling BAPI 'BAPI_KANBANCC_CHANGE' inside a LOOP-ENDLOOP, where the control cycle number, material, supply area and plant is passed one by one to the BAPI.

It works fine when only one control cycle is passed.

When multiple control cycles are passed, it does not clear some of the standard parameters related to configuration.

Due to which the program fails to update.

Following is the part of standard code inside the BAPI where it fails.

FORM check_terminierung USING pkhd_is LIKE pkhd.

IF tpk02-uttrm = xflag "Prüfung, wenn Felder auf

OR tpk03-uttrm = xflag. "dem screen schon aufgeblendet

IF pkhd_is-kcprf IS INITIAL

OR tpkbp-schgrup IS INITIAL

OR tpkbp-sprog IS INITIAL

OR tpkbp-fabkl IS INITIAL.

SET CURSOR FIELD 'PKHD-KCPRF'.

MESSAGE e334.

ELSEIF pkhd_is-kwbzm IS INITIAL

AND tpkbp-kwbzm IS INITIAL.

SET CURSOR FIELD 'PKHD-KWBZM'.

MESSAGE e334.

ENDIF.

ENDIF.

ENDFORM. " CHECK_TERMINIERUNG

Does anyone has any idea, on how we can clear off the old values ?

Thanks,

Sunanda.

Hi All,

I am having a program which updates Kanban Control Cycle in mass.

I am calling BAPI 'BAPI_KANBANCC_CHANGE' inside a LOOP-ENDLOOP, where the control cycle number, material, supply area and plant is passed one by one to the BAPI.

It works fine when only one control cycle is passed.

When multiple control cycles are passed, it does not clear some of the standard parameters related to configuration.

Due to which the program fails to update.

Following is the part of standard code inside the BAPI where it fails.

FORM check_terminierung USING pkhd_is LIKE pkhd.

IF tpk02-uttrm = xflag "Prüfung, wenn Felder auf

OR tpk03-uttrm = xflag. "dem screen schon aufgeblendet

IF pkhd_is-kcprf IS INITIAL

OR tpkbp-schgrup IS INITIAL

OR tpkbp-sprog IS INITIAL

OR tpkbp-fabkl IS INITIAL.

SET CURSOR FIELD 'PKHD-KCPRF'.

MESSAGE e334.

ELSEIF pkhd_is-kwbzm IS INITIAL

AND tpkbp-kwbzm IS INITIAL.

SET CURSOR FIELD 'PKHD-KWBZM'.

MESSAGE e334.

ENDIF.

ENDIF.

ENDFORM. " CHECK_TERMINIERUNG

Does anyone has any idea, on how we can clear off the old values ?

Thanks,

Sunanda.

3 REPLIES 3
Read only

Former Member
0 Likes
669

Hello Sunanda,

I had the same problem. Please use the FM:

PK_REFRESH_ALL.

before calling your BAPI_KANBANCC_CHANGE.

It is working fine.

I would answer early, but only now in February I had that problem.

Please write, what was your solution.

Bye,

Peter

Read only

Former Member
0 Likes
669

Hello Sunanda,

I had the same problem. Please use the FM:

PK_REFRESH_ALL.

before calling your BAPI_KANBANCC_CHANGE.

It is working fine.

I would answer early, but only now in February I had that problem.

Please write, what was your solution.

Bye,

Peter

Read only

Former Member
0 Likes
669

Hello Sunanda,

I had the same problem. Please use the FM:

PK_REFRESH_ALL.

before calling your BAPI_KANBANCC_CHANGE.

It is working fine.

I would answer early, but only now in February I had that problem.

Please write, what was your solution.

Bye,

Peter