cancel
Showing results for 
Search instead for 
Did you mean: 

perform and form doubt

Former Member
0 Kudos

Dear Experts,

For auto approval i'm using the following code..,.,


loop at it_mid into wa_mid.
****  write  :/10 'employee id' color 5 , wa_mid-pernr,
****          60 'CREATED DATE' color 4 ,wa_mid-wi_cd,
****          90 'REQUEST ID' COLOR 4, WA_MID-REQUEST_ID.

***  LV_EIGHTH_DATE = WA_MID-WI_CD + 7. "enable this during transport

***  IF WA_MID-WI_CD GE LV_EIGHTH_DATE. "enable this during transport

PERFORM AUTO_APPROVE USING WA_MID-PERNR
                           WA_MID-REQUEST_ID.

CLEAR : WA_MID-WI_CD.
CLEAR : LV_EIGHTH_DATE.
***    ENDIF.
  endloop.
*&---------------------------------------------------------------------*
*&      Form  AUTO_APPROVE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_WA_MID_WI_CD  text
*      -->P_WA_MID_WI_CD  text
*----------------------------------------------------------------------*
form AUTO_APPROVE  using    p_wa_mid_PERNR
                            p_wa_mid_REQUEST_ID.

DATA : LV_REQUEST_ID TYPE TIM_REQ_ID,
       LV_PERNR  TYPE  P_PERNR,
       LV_COMMAND TYPE PTREQ_COMMAND.
DATA : EX_COMMANDS TYPE PTARQ_UIA_COMMAND_TAB,
       ex_messages type PTARQ_UIA_MESSAGES_TAB.
data : lv_modus type PT_ARQ_MODE.

LV_REQUEST_ID = P_WA_mid_request_id.
LV_PERNR      = P_WA_MID_PERNR.
LV_COMMAND    = 'EXECUTE_APPROVE'.
lv_modus      = 'R'.

CALL FUNCTION 'PT_ARQ_REQUEST_EXECUTE'
  EXPORTING
    im_request_id        = LV_REQUEST_ID " P_WA_MID_REQUEST_ID
    IM_COMMAND           = LV_COMMAND
    im_pernr             = LV_PERNR " P_WA_MID_PERNR
    im_modus             = lv_modus
   IM_DEBUG             = ''
* IMPORTING
*   EX_REQUEST           =
*   EX_HAS_ERRORS        =
*   EX_SHOW_CHANGE       =
 tables
    ex_messages          = ex_messages
    ex_commands          = ex_commands.
CLEAR : p_wa_mid_PERNR,  p_wa_mid_REQUEST_ID.
clear : LV_REQUEST_ID, LV_PERNR .
endform.                    " AUTO_APPROVE

here only one request is getting approved , again when it goes into loop this f.m is going to dump, what is worng with this code

can some body suggest me is there any other way to do this.,.,

Thanks and Regards,

Thirukumaran. R

Accepted Solutions (1)

Accepted Solutions (1)

former_member198275
Active Contributor
0 Kudos

Hi, this error is giving in (if Im not wrong).

WHEN OTHERS.
      MESSAGE x999(53) WITH 'unknown ui command'.

so can you check the value for LV_COMMAND is not initial before going to second record?

Answers (1)

Answers (1)

former_member198275
Active Contributor
0 Kudos

Whats the dump u r getting?

Former Member
0 Kudos

post the dump analysis please

Former Member
0 Kudos

The current application program detected a situation which really

should not occur. Therefore, a termination with a short dump was

triggered on purpose by the key word MESSAGE (type X).

Short text of error message:

Long text of error message:

Technical information about the message:

Message class....... 53

Number.............. 999

Variable 1.......... " "

Variable 2.......... " "

Variable 3.......... " "

Variable 4.......... " "

Probably the only way to eliminate the error is to correct the program.

-

If the error occures in a non-modified SAP program, you may be able to

find an interim solution in an SAP Note.

If you have access to SAP Notes, carry out a search with the following

keywords:

"MESSAGE_TYPE_X" " "

"SAPLPT_ARQ_REQUEST_UIA" or "LPT_ARQ_REQUEST_UIAF14"

"CHECK_APPLICATION_STATUS"

If you cannot solve the problem yourself and want to send an error

notification to SAP, include the following information:

1. The description of the current problem (short dump)

To save the description, choose "System->List->Save->Local File

(Unconverted)".

2. Corresponding system log

Display the system log by calling transaction SM21.

Restrict the time interval to 10 minutes before and five minutes

after the short dump. Then choose "System->List->Save->Local File

(Unconverted)".

3. If the problem occurs in a problem of your own or a modified SAP

program: The source code of the program

In the editor, choose "Utilities->More

Utilities->Upload/Download->Download".

4. Details about the conditions under which the error occurred or which

actions and input led to the error.

Thanks and Regards,

Thirukumaran. R