2009 Jan 22 11:32 AM
if i write the below code in PBO module (status 1000) then it sets the output only field (PROCSS) to CREATE if t-code is 'ZPURCR_22609'
************************************
DATA PROCESS TYPE STRING.
IF SY-TCODE EQ 'ZPURCR_22609'.
PROCESS = 'CREATE'.
ENDIF.
IF SY-TCODE EQ 'ZPURCHG_22609'.
PROCESS = 'CHANGE'.
ENDIF.
IF SY-TCODE EQ 'ZPURDIS_22609'.
PROCESS = 'DISPLAY'.
ENDIF.
*****************************************
but instead if i write the code as shown below it doesn't set the output only field (PROCSS) to CREATE if t-code is 'ZPURCR_22609'
perform SET_NAME_OF_SCREEN_PBO.
in pbo and then i write the code in include file
FORM SET_NAME_OF_SCREEN_PBO.
DATA PROCESS TYPE STRING.
IF SY-TCODE EQ 'ZPURCR_22609'.
PROCESS = 'CREATE'.
ENDIF.
IF SY-TCODE EQ 'ZPURCHG_22609'.
PROCESS = 'CHANGE'.
ENDIF.
IF SY-TCODE EQ 'ZPURDIS_22609'.
PROCESS = 'DISPLAY'.
ENDIF.
ENDFORM.
if i write the below code in PBO module (status 1000) then it sets the output only field (PROCSS) to CREATE if t-code is 'ZPURCR_22609'
************************************
DATA PROCESS TYPE STRING.
IF SY-TCODE EQ 'ZPURCR_22609'.
PROCESS = 'CREATE'.
ENDIF.
IF SY-TCODE EQ 'ZPURCHG_22609'.
PROCESS = 'CHANGE'.
ENDIF.
IF SY-TCODE EQ 'ZPURDIS_22609'.
PROCESS = 'DISPLAY'.
ENDIF.
*****************************************
but instead if i write the code as shown below it doesn't set the output only field (PROCSS) to CREATE if t-code is 'ZPURCR_22609'
perform SET_NAME_OF_SCREEN_PBO.
in pbo and then i write the code in include file
FORM SET_NAME_OF_SCREEN_PBO.
DATA PROCESS TYPE STRING.
IF SY-TCODE EQ 'ZPURCR_22609'.
PROCESS = 'CREATE'.
ENDIF.
IF SY-TCODE EQ 'ZPURCHG_22609'.
PROCESS = 'CHANGE'.
ENDIF.
IF SY-TCODE EQ 'ZPURDIS_22609'.
PROCESS = 'DISPLAY'.
ENDIF.
ENDFORM.
2009 Jan 22 11:36 AM
In PBO...u r not supposed to create a for...u shud do ur coding inside MODULE.
u can create a new module and do the same coding inside dat.
PBO.
MODULE STATUS_1000.
MODULE SET_PROCESS. "inside this put ur code.
2009 Jan 22 11:40 AM
Hi,
In PBO write like this.
Module SET_NAME_OF_SCREEN_PBO.
THEN INSIDE THE MODULE WRITE
Module SET_NAME_OF_SCREEN_PBO OUTPUT.
DATA PROCESS TYPE STRING.
IF SY-TCODE EQ 'ZPURCR_22609'.
PROCESS = 'CREATE'.
ENDIF.
IF SY-TCODE EQ 'ZPURCHG_22609'.
PROCESS = 'CHANGE'.
ENDIF.
IF SY-TCODE EQ 'ZPURDIS_22609'.
PROCESS = 'DISPLAY'.
ENDIF.
ENDMODULE.
Regards
Sandipan
2009 Jan 22 12:01 PM
hello,
what you are doing is right ,just declare the variable process outside the form ,in the abap editor and perform the subroutine like :
perform <subroutine> changing process.
form <subroutine changing process.
then this will store the changed value in the variable process.
hope it helps
geeta gupta
2009 Jan 22 12:03 PM
thanks your suggestion is correct but can you tell me what is the reason for this why we need to declare the variable outside perform and in pbo
2009 Jan 22 12:10 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |