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

function module inside loop

Former Member
0 Likes
954

Dear Experts,

i'm using the function module PT_ARQ_REQUEST_EXECUTE inside the loop and passing the

values for request id and pernr,


loop at it_mid into wa_mid.
LV_REQUEST_ID = WA_mid-request_id.
LV_PERNR      = WA_MID-PERNR.
CALL FUNCTION 'PT_ARQ_REQUEST_EXECUTE'
  EXPORTING
    im_request_id        =  LV_REQUEST_ID " P_WA_MID_REQUEST_ID
    IM_COMMAND           =  'EXECUTE_APPROVE'
    im_pernr             =  LV_PERNR " P_WA_MID_PERNR
    im_modus             =  'R'
   IM_DEBUG              =  ''
 tables
    ex_messages          = ex_messages
    ex_commands          = ex_commands.

if sy-subrc ne 0.
  message 'An error occured' TYPE 'E'.
  endif.
clear : LV_REQUEST_ID, LV_PERNR.
  endloop.

.

Here in std function module i'm getting dump like ' IF app_pernr = pernr AND app_modus = modus.

  • Application is Consistent

ELSE.

  • Application is NOT Consistent, then DUMP

MESSAGE x999(53). "#EC *

ENDIF.'

i'm passing pernr always, and for app_modus i have hardcoded as 'R' , Then also its going to dump.,.,

wat is the reason is there any other way to do this..,

N.B:- for first time inside the loop its executing, for second records itds going to dump means app_modus is not passig it seems what to do with this... issue can any one suggest me ...

Thanks and Regards,

Thirukumaran. R

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
758

HI,

It seems to be problem with leading zeroes in PERNR.

so before using this FM, use one more FM : CONVERSION_EXIT_ALPHA_INPUT.

Just have a try.

Regds,

Anil

6 REPLIES 6
Read only

Former Member
0 Likes
759

HI,

It seems to be problem with leading zeroes in PERNR.

so before using this FM, use one more FM : CONVERSION_EXIT_ALPHA_INPUT.

Just have a try.

Regds,

Anil

Read only

0 Likes
758

Dear Anitl,

Again its going to dump only i'm passing pernr and modus as 'R' still this is going to dump what is the problem behind this, is it possible to change my code.

Thanks and Regards,

Thirukumaran. R

Read only

0 Likes
758

Hello

Refer this link:

May be it will help you.

Read only

Former Member
0 Likes
757

Hi Thirukumaran,

use FM CONVERSION_EXIT_ALPHA_INPUT

for WA_mid-request_id also.

and try.

I hope this will work.

Regards,

Vijay

Read only

0 Likes
757

is this CONVERSION_EXIT_ALPHA_INPUT or

CONVERSION_EXIT_ALPHA_output

Read only

Former Member
0 Likes
757

Try running FM PT_ARQ_REQUEST_CHECK before each execution of your FM.

Rob