can i use subrotine without paramters for this program ?
@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Ай бұрын
Thanks you@@sapabapbyrahulmehta
@AnupKumar-ng9tq11 ай бұрын
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.
@sapabapbyrahulmehta11 ай бұрын
We declared the work area in the top of the program at the line no -14, so it is accessible in subroutine also.
@bidiptachakraborty36135 ай бұрын
@@sapabapbyrahulmehta so it'll take that as a global declaration ? Can't we do the same for the internal table also ?
@sapabapbyrahulmehta5 ай бұрын
@@bidiptachakraborty3613 Yes you can.
@romasingh62673 күн бұрын
@@sapabapbyrahulmehta But the work area type is local structure, how is it accessible in the subroutine?
@sapabapbyrahulmehta2 күн бұрын
@@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-q9x2 ай бұрын
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?
@sapabapbyrahulmehta2 ай бұрын
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Ай бұрын
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Ай бұрын
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.
@MrSrikanthboosa6 ай бұрын
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) ???
@sapabapbyrahulmehta6 ай бұрын
It is not mandatory. If you think, only single record is there, we can directly take in work area as well.
@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 Жыл бұрын
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 Жыл бұрын
@@sapabapbyrahulmehta oh got it sir.
@rajameenasankar18514 ай бұрын
hi, can we use internal_table type standard_table?
@sapabapbyrahulmehta4 ай бұрын
Yes you can use, but in that case you need to use dynamic programming(Field-Symbols) to refer the fields of the internal table.