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 ERROR in function module CACS_BUPA_PAI_SPECIAL_CACSB1

Former Member
0 Likes
683

Hi experts,

I am trying to create business partner in SAP treasury module with role - general business partner and validity period 01/01/0001 - 12/31/9999. I am gettting syntax error in Function module CACS_BUPA_PAI_SPECIAL_CACSB1, it says

The key of internal table 'LT_BUT0BK' contains components of type 'X' or 'XSTRING'.

The "Read table LT_BUTOBK" statement is not permitted for such tables in a unicode context.

Please let me know if you have any solution for this.

Thanks in advance.

Edited by: Thanvi maraka on Apr 17, 2009 3:27 AM

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
605

Hello Thanvi

It seems that you need to apply the OSS note 1041283:


FUNCTION cacs_bupa_pai_special_cacsb1.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"----------------------------------------------------------------------


  DATA: lt_but0bk TYPE TABLE OF but0bk WITH HEADER LINE.


  CALL FUNCTION 'BUP_BUPA_BUT0BK_GET'
       TABLES
            t_but0bk = lt_but0bk.


* einmal vorhanden -> nehmen; nicht vorhanden -> Feld muss leer sein
* mehrmals vorhanden -> Mussfeld
  READ TABLE lt_but0bk INDEX 2.
  IF sy-subrc NE 0.
*    READ TABLE lt_but0bk.          "NOTE 1041283   " <<<<<<<<<
     READ TABLE lt_but0bk FROM lt_but0bk.            " <<<<<<<<<

    IF sy-subrc = 0.
      cacs_s_bupaw-bank_id = lt_but0bk-bkvid.
    ENDIF.

  ELSE.

Regards

Uwe

Hi experts,

I am trying to create business partner in SAP treasury module with role - general business partner and validity period 01/01/0001 - 12/31/9999. I am gettting syntax error in Function module CACS_BUPA_PAI_SPECIAL_CACSB1, it says

The key of internal table 'LT_BUT0BK' contains components of type 'X' or 'XSTRING'.

The "Read table LT_BUTOBK" statement is not permitted for such tables in a unicode context.

Please let me know if you have any solution for this.

Thanks in advance.

Edited by: Thanvi maraka on Apr 17, 2009 3:27 AM

3 REPLIES 3
Read only

Former Member
0 Likes
605

Try converting the data from Xstring to char or string.

Read only

uwe_schieferstein
Active Contributor
0 Likes
606

Hello Thanvi

It seems that you need to apply the OSS note 1041283:


FUNCTION cacs_bupa_pai_special_cacsb1.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"----------------------------------------------------------------------


  DATA: lt_but0bk TYPE TABLE OF but0bk WITH HEADER LINE.


  CALL FUNCTION 'BUP_BUPA_BUT0BK_GET'
       TABLES
            t_but0bk = lt_but0bk.


* einmal vorhanden -> nehmen; nicht vorhanden -> Feld muss leer sein
* mehrmals vorhanden -> Mussfeld
  READ TABLE lt_but0bk INDEX 2.
  IF sy-subrc NE 0.
*    READ TABLE lt_but0bk.          "NOTE 1041283   " <<<<<<<<<
     READ TABLE lt_but0bk FROM lt_but0bk.            " <<<<<<<<<

    IF sy-subrc = 0.
      cacs_s_bupaw-bank_id = lt_but0bk-bkvid.
    ENDIF.

  ELSE.

Regards

Uwe

Read only

0 Likes
605

Hi Uwe,

Thank you so much. The OSS note you gave me worked successfully.I appreciate your help.

Regards,

Thanvi