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

dump "UC_OBJECTS_NOT_CHARLIKE

Former Member
0 Likes
6,886

dump "UC_OBJECTS_NOT_CHARLIKE

 

hi eswar,

facing the dump "UC_OBJECTS_NOT_CHARLIKE"

statement that is executed to givce dump is

CONCATENATE

                 <compcode>

                <calmonth>

<doc no>

INTO

<zcntchar>.

 

Upon executing the above stmnt  ABAP dump occurs.

 

Data is declared like this

compcode,calmonth,doc no, zcntchar TYPE ANY.

 

I get hte erro in dump like this.

"the current stmnt is defined for char type objects"

For the stmnt CONCATENATE only character-type   data objects are supported at the arguemnt position <zcntchar>

In this case,the operand <zntchar> has the non-character type g_s_data.

The current progm is unicode program.

In unicode context, the type "X" or strucutres containing not only character-type components are regarded as non-character type.

 

 

 

I googled.

1.found sap notes that were not rlevant to my context.

2.this link

 

http://scn.sap.com/message/5414634

.

 

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,333

Use only character type fields in the concatenate statement if UC activated on system/program. You can map some other types with use of ASSIGN CASTING but insure those contain actually only character type fields (subfields). Use a <field symbol> of type character to perform the concatenate and then with ASSIGN CASTING map it you your (structure ?) field <zcntchar>.

NB: If <zcntchar> is actually referencing a strcuture, why do you use concatenate and do not map data to subfields ?

Regards,

Raymond

15 REPLIES 15
Read only

amol_samte
Contributor
0 Likes
3,333

Hi,

find below link

http://scn.sap.com/thread/1813919

Regards,

Amol

Read only

gouravkumar64
Active Contributor
0 Likes
3,333

Hi,

I am not sure,

I think this kind of error occurs due to conversion of  xstring to string problem

Try with some FM HR_KR_XSTRING_TO_STRING like this .

Thanks

Gourav.

Read only

Former Member
0 Likes
3,333

Hi can u pl explain why converting xstring to string will fix the problem.

am tryin to understand the issue .

Regards,

SuryaD.

Read only

0 Likes
3,333

Hi,

Try like this

1)Declaration part:-

data: lo_con type ref to cl_abap_conv_in_ce,

loc_string type xstring,

loc_string type string,

2)conversion:-

CALL METHOD CL_ABAP_CONV_IN_CE=>CREATE

  EXPORTING

    INPUT       = LOC_XSTRING

    ENCODING    = 'UTF-8'

    REPLACEMENT = '?'

    IGNORE_CERR = ABAP_TRUE

  RECEIVING

    CONV        = LOC_CONV.

TRY.

    CALL METHOD LOC_CONV->READ

      IMPORTING

        DATA = LOC_STRING.

  CATCH CX_SY_CONVERSION_CODEPAGE.

*Should ignore errors in code conversions

  CATCH CX_SY_CODEPAGE_CONVERTER_INIT.

* Should ignore errors in code conversions

  CATCH CX_PARAMETER_INVALID_TYPE.

  CATCH CX_PARAMETER_INVALID_RANGE.

ENDTRY.

OR.....

CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'

EXPORTING

in_xstring = loc_xstring

IMPORTING

out_string = loc_string.

Gourav.

Read only

0 Likes
3,333

Hi Gourav,

thanks for your example.

can u pl guide me as to how i can apply this to my example here

my code dumps when it executes this statemnt.

CONCATENATE  <compcode>

         <calmonth>

                               <doc no>

INTO

                            <zcntchar

So here wat has to be converted to string?

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,334

Use only character type fields in the concatenate statement if UC activated on system/program. You can map some other types with use of ASSIGN CASTING but insure those contain actually only character type fields (subfields). Use a <field symbol> of type character to perform the concatenate and then with ASSIGN CASTING map it you your (structure ?) field <zcntchar>.

NB: If <zcntchar> is actually referencing a strcuture, why do you use concatenate and do not map data to subfields ?

Regards,

Raymond

Read only

0 Likes
3,333

Hi Raymond,

Thanks for your response.

The data that i am using in the concatenate statement is declared like this.

Data is declared like this

compcode,calmonth,doc no, zcntchar TYPE ANY.

all thefields are delcared of type ANY.

when i look into the contents of the fields in runtime, they luk like structure.

So can u pl guide as to how i need to declare these fields to get rid of the dump.

Regs,

SuryaD.

Read only

0 Likes
3,333

Declaration and assignment of field symbols could look like

  FIELD-SYMBOLS <concatenate_operand> TYPE C.

  ASSIGN true_field TO <concatenate_operand> CASTING.

Then use the defined character-like type field symbols  in your CONCATENATE statement.

Regards,

Raymond

Read only

0 Likes
3,333

Thanks again raymond for your reply.

Please check mhy code below and pl correct me if i have gone wrong.

My intention is to concatente compcode and inv doc no.

FIELD SYMBOLS < comp code,> TYPE C,

                          < inv docno> TYPE C,

                         <zcompinv> TYPE C.

ASSIGN ...

CONCATENATE <comp code>

                         <inv docno>

INTO

                       <zcompinv>

Please help me with that ASSIGN part declaration.

Unable to understand as to what i need to put in teh true field .

Regs,

SuryaD.

Read only

0 Likes
3,333
As I left my crystal ball home, can you post your current code,  line with ASSIGN xxxx TO <zcntchar>, you should just have to add the CASTING option.
ASSIGN zcntchar to <zcntchar>.
replaced by

ASSIGN zcntchar to <zcntchar> CASTING.

Regards,
Raymond

Read only

0 Likes
3,333

Hi Raymond,

Progra dumps at he line concatenate (whihc i have marked as bold).

Please find the code elow.


FORM user_zmfippr0 USING i_s_rkb1d TYPE rsr_s_rkb1d
CHANGING c_s_data TYPE any.

  FIELD-SYMBOLS: <fs_zvirchar1>,
                 <fs_0clear_date>,
                 <fs_0netduedate>,
*--> Begin of changes for defect 259617
                   <lfs_0comp_code> TYPE ANY,    "Company Code
                   <lfs_0calmonth>  TYPE ANY,    "Calendar Month
                   <lfs_zl_doc_no>  TYPE ANY,    "LIV Invoice
                   <lfs_zcntchar>   TYPE ANY,    "Count of Invoices
                   <lfs_0ac_doc_no> TYPE ANY.    "Ac Doc Invoice
*<-- End of changes for defect 259617

*  ASSIGN COMPONENT g_pos_zmfippr0_l_zvirchar1
*         OF STRUCTURE c_s_data
*         TO <fs_zvirchar1>.
*
*  ASSIGN COMPONENT g_pos_zmfippr0_l_0clear_date
*         OF STRUCTURE c_s_data
*         TO <fs_0clear_date>.
*
*  ASSIGN COMPONENT g_pos_zmfippr0_l_0netduedate
*         OF STRUCTURE c_s_data
*         TO <fs_0netduedate>.

  ASSIGN COMPONENT g_pos_zmfippr0_zvirchar1
           OF STRUCTURE c_s_data
           TO <fs_zvirchar1>.

  ASSIGN COMPONENT g_pos_zmfippr0_0clear_date
         OF STRUCTURE c_s_data
         TO <fs_0clear_date>.

  ASSIGN COMPONENT g_pos_zmfippr0_0netduedate
         OF STRUCTURE c_s_data
         TO <fs_0netduedate>.


*--> Begin of changes for defect 259617
  ASSIGN COMPONENT g_pos_zmfippr0_0comp_code
     OF STRUCTURE c_s_data TO <lfs_0comp_code>.

  ASSIGN COMPONENT g_pos_zmfippr0_0calmonth
     OF STRUCTURE c_s_data TO <lfs_0calmonth>.

  ASSIGN COMPONENT g_pos_zmfippr0_0ac_doc_no
     OF STRUCTURE c_s_data TO <lfs_0ac_doc_no>.

  ASSIGN COMPONENT g_pos_zmfippr0_zcntchar
     OF STRUCTURE c_s_data TO <lfs_zcntchar>.

  ASSIGN COMPONENT g_pos_zmfippr0_zl_doc_no
     OF STRUCTURE c_s_data TO <lfs_zl_doc_no>.
*<-- End of changes for defect 259617

  IF i_s_rkb1d-compid = c_zqyzmfippr0_c021.
*  'ZQYZMFIPPR0_C021'.
    <fs_zvirchar1> = '99'.
    CASE <fs_0clear_date>.
*      WHEN space.
      WHEN 0.

        i_finalvalue = ( sy-datum - <fs_0netduedate> ).
        IF i_finalvalue <= i_ageing1.
          <fs_zvirchar1> = '01'.
        ELSEIF i_finalvalue > i_ageing1 AND i_finalvalue <= i_ageing2.
          <fs_zvirchar1> = '02'.
        ELSEIF i_finalvalue > i_ageing2 AND i_finalvalue <= i_ageing3.
          <fs_zvirchar1> = '03'.
        ELSEIF i_finalvalue > i_ageing3 AND i_finalvalue <= i_ageing4.
          <fs_zvirchar1> = '04'.
        ELSEIF i_finalvalue > i_ageing4 AND i_finalvalue <= i_ageing5.
          <fs_zvirchar1> = '05'.
        ELSEIF i_finalvalue > i_ageing5 AND i_finalvalue <= i_ageing6.
          <fs_zvirchar1> = '06'.
        ELSEIF i_finalvalue > i_ageing6.
          <fs_zvirchar1> = '07'.
        ENDIF.

*      WHEN OTHERS.
*        i_finalvalue = ( <fs_0clear_date> - <fs_0netduedate> ).
*        IF i_finalvalue <= 0.
*          <fs_zvirchar1> = '00'.
*        ELSEIF i_finalvalue <= i_ageing1.
*          <fs_zvirchar1> = '01'.
*        ELSEIF i_finalvalue > i_ageing1 AND i_finalvalue <= i_ageing2.
*          <fs_zvirchar1> = '02'.
*        ELSEIF i_finalvalue > i_ageing2 AND i_finalvalue <= i_ageing3.
*          <fs_zvirchar1> = '03'.
*        ELSEIF i_finalvalue > i_ageing3 AND i_finalvalue <= i_ageing4.
*          <fs_zvirchar1> = '04'.
*        ELSEIF i_finalvalue > i_ageing4 AND i_finalvalue <= i_ageing5.
*          <fs_zvirchar1> = '05'.
*        ELSEIF i_finalvalue > i_ageing5 AND i_finalvalue <= i_ageing6.
*          <fs_zvirchar1> = '06'.
*        ELSEIF i_finalvalue > i_ageing6.
*          <fs_zvirchar1> = '07'.
*        ENDIF.
    ENDCASE.
  ENDIF.

*--> Begin of changes for defect 259617
  IF      <lfs_0comp_code> IS ASSIGNED
      AND <lfs_0calmonth> IS ASSIGNED
      AND <lfs_zl_doc_no> IS ASSIGNED
      AND <lfs_zcntchar> IS ASSIGNED
      AND <lfs_0ac_doc_no> IS ASSIGNED.

    IF <lfs_zl_doc_no> is initial.

     CONCATENATE <lfs_0comp_code>
                  <lfs_0calmonth>(4)
                  <lfs_0ac_doc_no>
             INTO <lfs_zcntchar>.
   ELSE.

      CONCATENATE <lfs_0comp_code>
                  <lfs_0calmonth>(4)
                  <lfs_zl_doc_no>
             INTO <lfs_zcntchar>.

    ENDIF.

  ENDIF.

Read only

0 Likes
3,333

You did not code any of my suggestions (you kept TYPE ANY for field symbols, and no CASTINg during assignment)...

Read only

0 Likes
3,333

hi raymond,

am sorry, i thgut u needed the current (exisitng code).

Now i have mde the changes.

Please correct me if am wrong.

FORM user_zmfippr0 USING i_s_rkb1d TYPE rsr_s_rkb1d
CHANGING c_s_data TYPE any.

  FIELD-SYMBOLS: <fs_zvirchar1>,
                 <fs_0clear_date>,
                 <fs_0netduedate>,
*--> Begin of changes for defect 259617
                   <lfs_0comp_code> TYPE C,    "Company Code
                   <lfs_0calmonth>  TYPE C,    "Calendar Month
                   <lfs_zl_doc_no>  TYPE C,    "LIV Invoice
                   <lfs_zcntchar>  TYPE C,    "Count of Invoices
                   <lfs_0ac_doc_no> TYPE C .    "Ac Doc Invoice
*<-- End of changes for defect 259617

*  ASSIGN COMPONENT g_pos_zmfippr0_l_zvirchar1
*         OF STRUCTURE c_s_data
*         TO <fs_zvirchar1>.
*
*  ASSIGN COMPONENT g_pos_zmfippr0_l_0clear_date
*         OF STRUCTURE c_s_data
*         TO <fs_0clear_date>.
*
*  ASSIGN COMPONENT g_pos_zmfippr0_l_0netduedate
*         OF STRUCTURE c_s_data
*         TO <fs_0netduedate>.

  ASSIGN COMPONENT g_pos_zmfippr0_zvirchar1
           OF STRUCTURE c_s_data
           TO <fs_zvirchar1>.

  ASSIGN COMPONENT g_pos_zmfippr0_0clear_date
         OF STRUCTURE c_s_data
         TO <fs_0clear_date>.

  ASSIGN COMPONENT g_pos_zmfippr0_0netduedate
         OF STRUCTURE c_s_data
         TO <fs_0netduedate>.


*--> Begin of changes for defect 259617
  ASSIGN COMPONENT g_pos_zmfippr0_0comp_code
     OF STRUCTURE c_s_data TO <lfs_0comp_code> CASTING.

  ASSIGN COMPONENT g_pos_zmfippr0_0calmonth
     OF STRUCTURE c_s_data TO <lfs_0calmonth> CASTING.

  ASSIGN COMPONENT g_pos_zmfippr0_0ac_doc_no
     OF STRUCTURE c_s_data TO <lfs_0ac_doc_no> CASTING.

  ASSIGN COMPONENT g_pos_zmfippr0_zcntchar
     OF STRUCTURE c_s_data TO <lfs_zcntchar> CASTING.

  ASSIGN COMPONENT g_pos_zmfippr0_zl_doc_no
     OF STRUCTURE c_s_data TO <lfs_zl_doc_no> CASTING.
*<-- End of changes for defect 259617

  IF i_s_rkb1d-compid = c_zqyzmfippr0_c021.
*  'ZQYZMFIPPR0_C021'.
    <fs_zvirchar1> = '99'.
    CASE <fs_0clear_date>.
*      WHEN space.
      WHEN 0.

        i_finalvalue = ( sy-datum - <fs_0netduedate> ).
        IF i_finalvalue <= i_ageing1.
          <fs_zvirchar1> = '01'.
        ELSEIF i_finalvalue > i_ageing1 AND i_finalvalue <= i_ageing2.
          <fs_zvirchar1> = '02'.
        ELSEIF i_finalvalue > i_ageing2 AND i_finalvalue <= i_ageing3.
          <fs_zvirchar1> = '03'.
        ELSEIF i_finalvalue > i_ageing3 AND i_finalvalue <= i_ageing4.
          <fs_zvirchar1> = '04'.
        ELSEIF i_finalvalue > i_ageing4 AND i_finalvalue <= i_ageing5.
          <fs_zvirchar1> = '05'.
        ELSEIF i_finalvalue > i_ageing5 AND i_finalvalue <= i_ageing6.
          <fs_zvirchar1> = '06'.
        ELSEIF i_finalvalue > i_ageing6.
          <fs_zvirchar1> = '07'.
        ENDIF.

*      WHEN OTHERS.
*        i_finalvalue = ( <fs_0clear_date> - <fs_0netduedate> ).
*        IF i_finalvalue <= 0.
*          <fs_zvirchar1> = '00'.
*        ELSEIF i_finalvalue <= i_ageing1.
*          <fs_zvirchar1> = '01'.
*        ELSEIF i_finalvalue > i_ageing1 AND i_finalvalue <= i_ageing2.
*          <fs_zvirchar1> = '02'.
*        ELSEIF i_finalvalue > i_ageing2 AND i_finalvalue <= i_ageing3.
*          <fs_zvirchar1> = '03'.
*        ELSEIF i_finalvalue > i_ageing3 AND i_finalvalue <= i_ageing4.
*          <fs_zvirchar1> = '04'.
*        ELSEIF i_finalvalue > i_ageing4 AND i_finalvalue <= i_ageing5.
*          <fs_zvirchar1> = '05'.
*        ELSEIF i_finalvalue > i_ageing5 AND i_finalvalue <= i_ageing6.
*          <fs_zvirchar1> = '06'.
*        ELSEIF i_finalvalue > i_ageing6.
*          <fs_zvirchar1> = '07'.
*        ENDIF.
    ENDCASE.
  ENDIF.

*--> Begin of changes for defect 259617
  IF      <lfs_0comp_code> IS ASSIGNED
      AND <lfs_0calmonth> IS ASSIGNED
      AND <lfs_zl_doc_no> IS ASSIGNED
      AND <lfs_zcntchar> IS ASSIGNED
      AND <lfs_0ac_doc_no> IS ASSIGNED.

    IF <lfs_zl_doc_no> is initial.

      CONCATENATE <lfs_0comp_code>
                  <lfs_0calmonth>(4)
                  <lfs_0ac_doc_no>
             INTO <lfs_zcntchar>.
   ELSE.

      CONCATENATE <lfs_0comp_code>
                  <lfs_0calmonth>(4)
                  <lfs_zl_doc_no>
             INTO <lfs_zcntchar>.

    ENDIF.

  ENDIF.

Read only

0 Likes
3,333

Yes, now it should perform well, if every field is comptatible with character type (As are the standard InofObjects) I suppose the g_pos_zmfippr0_l_0netduedate are constants with uppercase for field names.

Regards,

Raymond

Read only

0 Likes
3,333

thanks a lot Raymond.

Appreciate all your patience, your time and your guidance.

Regards,

SuryaD.