Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Unicode Error for Macro Open statement

<b><u>I have a Macro defined as below:</u></b>

-macro-for-form-definition----


DEFINE M_OPEN.

----


  • FORM F_DSOPEN_&1_&2 *

----


  • This is a macro to dynamically open unix files *

----


  • --> dsn *

  • --> type *

  • --> c *

----


FORM F_DSOPEN_&1_&2 USING

P_XPATH.

DATA MSG(80).

OPEN DATASET P_XPATH FOR &1 IN &2 MODE MESSAGE MSG.

V_SUBRC = SY-SUBRC.

IF SY-SUBRC <> 0.

CONCATENATE V_DESC29 P_XPATH INTO V_DESC.

PERFORM F_CREATE_IT_ERR USING ' ' V_DESC.

ENDIF.

ENDFORM.

END-OF-DEFINITION.

<u><b>After that I am using that Macro as below:</b></u>

M_OPEN INPUT BINARY.

M_OPEN OUTPUT TEXT.

<u><b>Showing Error as below:</b></u>

ERROR: In "TEXT MODE" the "ENCODING" addition must be specified

<u><b>Solutions tried:</b></u>

I was suspecting that error for Open Dataset and added text mode / encoding for it. Still the problem is showing up.

So I guess some change should take place for M_OPEN statements.

ANY CLUES PLEASE.

Thanks

Kiran

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question