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

Simple issue in BADI

Former Member
0 Likes
751

Hi

I want to change one field in BADI(CACL_CHARACTER_INPUT) with name T16FB-KZFAE (Changability indicator for Purchasing Docs).

I have implemented one of the BADI method as below :

method IF_EX_CACL_CHARACTER_INPUT~SET_CHARACTER_INPUT.

if sy-tcode eq 'ME38' and '(SAPBLEND)CEKKO-BSART' eq 'LP'.

move '1' to '(SAPBLEND)T16FB-KZFAE'. "Did not work

*T16FB-KZFAE = '1'. "Did not work

*assign '1' to '(SAPBLEND)T16FB-KZFAE' . "Did not work

endif.

endmethod.

In the above code I want to make T16FB-KZFAE equal to '1'.

Though it is a simple looking thing, it actaually gives some Syntax errors when I make assignment as shown in above code.

When I debug the code the field is visible as '(SAPBLEND)CEKKO-BSART' and can be Changed !!

Please help in this situation.

Regards

1 ACCEPTED SOLUTION
Read only

valter_oliveira
Active Contributor
0 Likes
640

Try this:


FIELD-SYMBOLS: <fs1> TYPE ESART.
DATA: name(21) TYPE c VALUE '(SAPBLEND)CEKKO-BSART'.
ASSIGN (name) TO <fs1>.
IF sy-subrc EQ 0.
  <fs1> = '1'.
ENDIF.

Regards.

Valter Oliveira.

Edited by: Valter Oliveira on Sep 4, 2008 12:52 PM

Hi

I want to change one field in BADI(CACL_CHARACTER_INPUT) with name T16FB-KZFAE (Changability indicator for Purchasing Docs).

I have implemented one of the BADI method as below :

method IF_EX_CACL_CHARACTER_INPUT~SET_CHARACTER_INPUT.

if sy-tcode eq 'ME38' and '(SAPBLEND)CEKKO-BSART' eq 'LP'.

move '1' to '(SAPBLEND)T16FB-KZFAE'. "Did not work

*T16FB-KZFAE = '1'. "Did not work

*assign '1' to '(SAPBLEND)T16FB-KZFAE' . "Did not work

endif.

endmethod.

In the above code I want to make T16FB-KZFAE equal to '1'.

Though it is a simple looking thing, it actaually gives some Syntax errors when I make assignment as shown in above code.

When I debug the code the field is visible as '(SAPBLEND)CEKKO-BSART' and can be Changed !!

Please help in this situation.

Regards

2 REPLIES 2
Read only

valter_oliveira
Active Contributor
0 Likes
641

Try this:


FIELD-SYMBOLS: <fs1> TYPE ESART.
DATA: name(21) TYPE c VALUE '(SAPBLEND)CEKKO-BSART'.
ASSIGN (name) TO <fs1>.
IF sy-subrc EQ 0.
  <fs1> = '1'.
ENDIF.

Regards.

Valter Oliveira.

Edited by: Valter Oliveira on Sep 4, 2008 12:52 PM

Read only

Former Member
0 Likes
640

Let me try this...