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

Syntax check please

Former Member
0 Likes
433

I am getting error as

<b>"r_bktxt " is a table with out header line and therefore no component called "SIGN"</b>

with the below code . Could you please correct .I am writing this code in method of BADI in sap4.7.

  • To remove the hardcode logic and use the ZKAP entry

DATA : wa_zcharval1 TYPE zkap-zcharval1.

DATA : r_bktxt TYPE RANGE OF zkap-zcharval1.

r_bktxt-sign = 'I'.

r_bktxt-option = 'BT'.

SELECT zcharval1 INTO wa_zcharval1

FROM zkap

WHERE zcharfld1 = 'U319'

AND zcharfld2 = 'ACTIVE_BURKS'

AND znumfld1 = '0'

AND zseqno = '0'.

r_bktxt-low = wa_zcharval1.

APPEND r_bktxt.

ENDSELECT.

SELECT uzawe

UP TO 1 rows

FROM lfb1

INTO wa_uzawe

WHERE lifnr = i_rbkpv-lifnr " bseg-lifnr

AND bukrs IN r_bktxt.

ENDSELECT.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
403

Hello Sam

You coding is correct but you need to define a separate work area.

DATA : 
  r_bktxt TYPE RANGE OF zkap-zcharval1,  " itab w/o header line
  ls_rng  LIKE LINE OF r_bktxt.

  ls_rng-sign = 'I'.
  ls_rng-option = 'EQ'.
  ...
  APPEND ls_rng TO r_bktxt.

Regards

Uwe

2 REPLIES 2
Read only

Former Member
0 Likes
403

Delcare it in this way ...

Ranges : r_bktxt for zkap-zcharval1.

REgards,

santosh

Read only

uwe_schieferstein
Active Contributor
0 Likes
404

Hello Sam

You coding is correct but you need to define a separate work area.

DATA : 
  r_bktxt TYPE RANGE OF zkap-zcharval1,  " itab w/o header line
  ls_rng  LIKE LINE OF r_bktxt.

  ls_rng-sign = 'I'.
  ls_rng-option = 'EQ'.
  ...
  APPEND ls_rng TO r_bktxt.

Regards

Uwe