Found 92 Articles for ABAP

Creating a Function module in ABAP to take any table and write it to the screen

Manikanth Mani
Updated on 12-Jun-2020 13:49:01

1K+ Views

SAP List Viewer is used to add an ALV component and provides a flexible environment to display lists and tabular structure. A standard output consists of header, toolbar, and an output table. The user can adjust the settings to add column display, aggregations, and sorting options using additional dialog boxes.You can use following code to display any table:DATA: go_alv TYPE REF TO cl_salv_table.    CALL METHODcl_salv_table=>factory    IMPORTING       r_salv_table = go_alv    CHANGING       t_table     = itab.  go_alv->display( ).Another Dynamic Way to Output Any Internal Table is by using field-symbol, this is a ... Read More

Adding a condition using SQL or an ABAP program and difference in performance

Rama Giri
Updated on 28-Jan-2020 05:36:38

171 Views

As there are just 500, there would not be much difference among both options. You can use either of them.The ABAP code is as below −LOOP AT lt_table TRANSPORTING NO FIELDS WHERE exp > 5    ADD 1 TO lt_counter ENDLOOP

Incrementing an integer inside loop in an ABAP program

Fendadis John
Updated on 30-Jul-2019 22:30:20

519 Views

You need to use the following:You are missing spaces between ls_id+1. You can also use Add 1 to ls_idIn case you are using internal tables, you can directly use SY-TABIX and SY-Index depending upon whether the loop is nested or not.

Checking active process in SAP system and which code is running

George John
Updated on 30-Jul-2019 22:30:20

2K+ Views

There are a couple of Transactions- SM66 and SM50 that can be used for your requirement. The transaction SM66 is used to see all the active processes on the current system. You can choose a particular process you want to monitor by clicking on “process” and then click the “debugging” button. The Transaction SM50 shows only the process running on a current application server in which you are logged. To monitor your program, select “Administration”, then “program” and then debugging option. You would require finding out the process in which your program is running. This can be done by ... Read More

Concatenate 2 strings in ABAP without using CONCATENATE function

Moumita
Updated on 14-Feb-2020 05:32:25

2K+ Views

In ABAP you can use && sign to concatenate variables as belowDatahello TYPE string, world TYPE string, helloworld TYPE string. hello = 'hello'. world = 'world'. helloworld = hello && world.If you want to concatenate strings directly, you can usehelloworld = 'hello' && 'world'.If you want to keep space in between, you would require ` symbol as belowhelloworld = hello && ` and ` && world

Assigning debug roles to few users of SAP ABAP program

Anjana
Updated on 06-Dec-2019 11:14:34

532 Views

Hope the role that you have added contains only one permission:Object S_DEVELOP    ACTVT = 03    DEVCLASS = *    OBJNAME = *    OBJTYPE = DEBUG    P_GROUP = *Try to perform a permission trace usingTransaction ST01If you still don’t find a check for the permission, there might be a problem in generating roles in the system. Sometimes when you add a role, it might add a different set of roles to such users.There might be a different program written for Debugging. This can be checked using Transaction SU53 in the system. This can be used to display authorization data for user:

Using ABAP Function module RSAQ_REMOTE_QUERY_CALL, NO_DATA_SELECTED exception using selection parameters

Manikanth Mani
Updated on 14-Feb-2020 05:44:59

285 Views

As SAP provides flexible options that allow selection parameters easy to use. As you are using multiple parameters please note the following:Set KIND to “s” only for using select option. If you are using parameters, it should be “P”Instead of using EN, try using internal language “E”RSAQ_REMOTE_QUERY_FIELDLIST- this function module can be used to find the types as below −Use T-code SE37 and enter the FM name → Display

In ABAP, How to select all the data into my internal table using loops?

usharani
Updated on 10-Dec-2019 08:35:38

213 Views

There are different ways that you can use to check the performance of your program. As per my understanding, you can join all tables like this:SELECT t11~orgeh t11~msty t11~mshort t12~position t13~job t14~job_grade t14~scheme    INTO gt_my_combined_table    FROM zgerpt_rnk_min as t11    JOIN hrp1001 as t12    ON t11~orgeh = t12~objid    JOIN hrp1001 as t13    ON t12~position = t13~objid    JOIN hrp9003    ON t13~job = t14~objid WHERE t12~otype = 'O' AND    T12~sclas = 'S' AND    T12~begda LE p_keydt AND    T12~endda GE p_keydt AND    T12~plvar ='01' AND    T12~istat = '1' AND    T12~objid ... Read More

Adding a text plus and text written from a parameter type C in ABAP

varun
Updated on 10-Dec-2019 08:38:36

155 Views

This can be achieved by using String Expressions or by using CONCATENATE keyword. With the use of “Concatenate” operator && you can do this.To use String Expressions, you should check online documentation and sample programs by using T-code: ABAPDOCU as shown above.You can also refer to below link for ABAP documentation:https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/index.htm

Checking table existence using Class and it’s method in SE11 without using FM in ABAP

seetha
Updated on 10-Dec-2019 07:19:00

375 Views

To perform this without using Function module, you can use class- “cl_rebf_ddic_tabl”. Note that Class methods are almost similar to function modules. They are defined as code blocks to perform specific functionality.ExampleTry using below code: CALL METHOD cl_rebf_ddic_tabl=>exists EXPORTING    id_name = [table name]    id_tabclass = 'TRANSP' " For table    * if_noview = ABAP_FALSE       receiving       rf_exists = yes   . This will return “X” if the table exists in Transaction SE11.CALL METHOD CL_REBF_DDIC_TABL=>methodname EXPORTING/IMPORTING GET_TEXTTAB - Supplies the Corresponding Text Table GET_COMPLETE - Supplies All Technical Information GET_DETAIL_X - Supplies Extended Header Data GET_FIELD_LIST - ... Read More

Advertisements