29 - Modularization Techniques - Subroutines Part8

  Рет қаралды 4,111

SAP ABAP by Rahul Mehta

SAP ABAP by Rahul Mehta

Күн бұрын

Пікірлер: 21
@sVANAPALLISIVA
@sVANAPALLISIVA Ай бұрын
can i use subrotine without paramters for this program ?
@sapabapbyrahulmehta
@sapabapbyrahulmehta Ай бұрын
Hello - In this case, if you use subroutine without parameters, you need to create those many unique subroutines. Based upon current example - You need to go for 5 different subroutines. It's good to go for subroutine with parameters, as single subroutine with different parameters suffice the purpose.
@sVANAPALLISIVA
@sVANAPALLISIVA Ай бұрын
Thanks you​@@sapabapbyrahulmehta
@AnupKumar-ng9tq
@AnupKumar-ng9tq 11 ай бұрын
in this subroutine lwa_data-ono and lwa_data-pm is inside the subroutine but we are neither defined by using or changing nor we have defined their type.
@sapabapbyrahulmehta
@sapabapbyrahulmehta 11 ай бұрын
We declared the work area in the top of the program at the line no -14, so it is accessible in subroutine also.
@bidiptachakraborty3613
@bidiptachakraborty3613 5 ай бұрын
@@sapabapbyrahulmehta so it'll take that as a global declaration ? Can't we do the same for the internal table also ?
@sapabapbyrahulmehta
@sapabapbyrahulmehta 5 ай бұрын
@@bidiptachakraborty3613 Yes you can.
@romasingh6267
@romasingh6267 3 күн бұрын
@@sapabapbyrahulmehta But the work area type is local structure, how is it accessible in the subroutine?
@sapabapbyrahulmehta
@sapabapbyrahulmehta 2 күн бұрын
@@romasingh6267 Hello Roma - Declaring a work area which refers to local structure does not make a work area local. It is a just a declaration. It can be through local structure or global structure. We declared the work area in the main program. It means it will be accessible in the other parts of the program(Including the code of the subroutine).
@PURNASAI-q9x
@PURNASAI-q9x 2 ай бұрын
Hi Rahul, can we declare table type in the program and use that in subroutine for pt_data TYPE (table type declared in prg) instead of creating global structure and table type?
@sapabapbyrahulmehta
@sapabapbyrahulmehta 2 ай бұрын
Yes you can create in the program as well. For Example - I created this Table type in the program and used in the CHANGING. TYPES : ltty_data TYPE TABLE OF lty_data. FORM get_header USING pt_ono TYPE ZTSTR_RANGE_ONO CHANGING pt_data TYPE ltty_data.
@AvtanshDixit
@AvtanshDixit Ай бұрын
sir i tried creating table type ltty_data in the program itself and use it in subroutine for the internal table type but it showed error that "ltty_data is unknown", so should i declare ltty_data in subroutine itself or only global structure will work for formal parameters?
@sapabapbyrahulmehta
@sapabapbyrahulmehta Ай бұрын
Hello Avtansh - You can declare LTTY_DATA in the program as well as with the help of global structure. The only thing is you are not activating everything together. Activate the program and the include together, it will work.
@MrSrikanthboosa
@MrSrikanthboosa 6 ай бұрын
Rahul ji, If we write the work area instead of internal table in the changing parameter output is displaying.. Do We have to give internal table only at CHANGING (in perform) ???
@sapabapbyrahulmehta
@sapabapbyrahulmehta 6 ай бұрын
It is not mandatory. If you think, only single record is there, we can directly take in work area as well.
@dreamer9857
@dreamer9857 Жыл бұрын
Hello sir, i tried but there is no error for not specifying the internal table type. Im using version 7.9, will it be the reason. Code: Using pv_on type data_element Pv_pm type data_element Changing pt_data.
@sapabapbyrahulmehta
@sapabapbyrahulmehta Жыл бұрын
Hello, You have not written the logic in the subroutine, Write the logic and then system will understand, It is not an internal table.
@dreamer9857
@dreamer9857 Жыл бұрын
@@sapabapbyrahulmehta oh got it sir.
@rajameenasankar1851
@rajameenasankar1851 4 ай бұрын
hi, can we use internal_table type standard_table?
@sapabapbyrahulmehta
@sapabapbyrahulmehta 4 ай бұрын
Yes you can use, but in that case you need to use dynamic programming(Field-Symbols) to refer the fields of the internal table.
@rajameenasankar1851
@rajameenasankar1851 4 ай бұрын
@@sapabapbyrahulmehta okay, understood.. thanks 🙂
30 - Modularization Techniques - Subroutines Part9
16:34
SAP ABAP by Rahul Mehta
Рет қаралды 3,7 М.
She wanted to set me up #shorts by Tsuriki Show
0:56
Tsuriki Show
Рет қаралды 8 МЛН
20 - Debugging - Script - Stop SAP Debugger on Selection of Tables Part1
12:02
SAP ABAP by Rahul Mehta
Рет қаралды 3,1 М.
Video 1: BDC Introduction and Call Transaction method
1:01:30
Just2Share
Рет қаралды 18 М.
22 - Debugging - Script - Stop SAP Debugger on Updating of Database Tables Part1
14:52
SAP SD Third Party sales process with MIGO and Without MIGO complete class with Configuration
30:15
Video 1: OData Service - Introduction
27:07
Just2Share
Рет қаралды 96 М.
19. SAP Background Jobs (SM36, SM37)
30:27
SAP Learning Hub
Рет қаралды 27 М.
23 - ALV - TOP-OF-PAGE Part1
14:04
SAP ABAP by Rahul Mehta
Рет қаралды 15 М.