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

Using Function Modules in AP: Syntax

Former Member
0 Likes
449

Hi experts.

I want to call Function Module in ABAP program written by using "AP:" syntax, like following.

AP:

  ' REPORT ZZZIG_VMR00. '

,' INCLUDE ZZZIG_VIF0001. '

,' FORM F_INSERT_DATA '

,' USING '

.

.

.

,' CALL FUNCTION 'NUMBER_GET_NEXT' '

,'  EXPORTING '

,'   NR_RANGE_NR = CL_RANGENO '

,'   OBJECT = CL_RANGEOBJ '

,'  IMPORTING '

.

.

.

But this makes conpile error,

because CALL FUNCTION statement needs " ' (single quotation)" .

I think this error can be pass by escaping " ' " around Function Module name,

but I have not solve this problem.

Can you have any good idea to escape " ' " in AP: syntax ?

Regards,

Hodaka Yamada

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
386

This problem has been solved by following escape logic.

      ,'    CALL FUNCTION ''NUMBER_GET_NEXT''      EXPORTING '

      ,'        NR_RANGE_NR                   = CL_RANGENO '
      ,'        OBJECT                        = CL_RANGEOBJ '
      ,'     IMPORTING '

Regards,

Hodaka Yamada

1 REPLY 1
Read only

Former Member
0 Likes
387

This problem has been solved by following escape logic.

      ,'    CALL FUNCTION ''NUMBER_GET_NEXT''      EXPORTING '

      ,'        NR_RANGE_NR                   = CL_RANGENO '
      ,'        OBJECT                        = CL_RANGEOBJ '
      ,'     IMPORTING '

Regards,

Hodaka Yamada