Consistently we learn something or the other at work. At some point, I found out about Designated spots Gathering in ABAP (T-Code SAAB). Recently I found out about OBN in ABAP interestingly. Nobody can profess to know it all on SAP. In this short article, I might want to introduce just 3 hints which I saw as exceptionally fascinating in SAP ABAP for HANA and one tip on typical ABAP which is extremely helpful.
- COALESCE function in Open SQL
As per SAP documentation, the Blend capability in Open SQL returns the worth of the contention arg1 (on the off chance that this isn’t the invalid worth); in any case, it returns the worth of the contention arg2. In the event that both contention 1 and 2 are invalid, the following contention arg3 esteem is returned. A clear space should be put after the initial enclosure and before the end bracket. A comma should be set between the contentions.
Tip: Clear isn’t Invalid. There is no such thing as in the event that a column by any means then it tends to be Invalid. However, in the event that a line exists, yet a few fields are clear, those clear fields are not Invalid.
Example-
SELECT so_id, so~gross_amount AS so_amount, inv_head~gross_amount AS inv_amount, " potential invoice amount COALESCE( inv_head~gross_amount, so~gross_amount ) AS expected_amount FROM snwd_so AS so LEFT OUTER JOIN snwd_so_inv_head AS inv_head ON inv_head~so_guid = so~node_key INTO TABLE @DATA(li_result).
Output –
SELECT lfa1~lifnr, lfa1~name1, ekko~ebeln, ekko~bukrs, COALESCE( ekko~lifnr, 'No PO' ) AS vendor FROM lfa1 AS lfa1 LEFT OUTER JOIN ekko AS ekko ON lfa1~lifnr EQ ekko~lifnr AND ekko~bukrs LT '0208' INTO TABLE @DATA(lt_vend_po) UP TO 100 ROWS. IF sy-subrc = 0. cl_demo_output=>display_data( EXPORTING value = lt_vend_po name = 'New AGE SQL : 5' ). ENDIF.
Output
In this model, in the event that the LIFNR has PO made, the Seller Number is printed, else, strict ‘No PO’ is imprinted on the Merchant Section. Trust you get it, clear/space isn’t Invalid.
2. How to get a list of all the keyboard shortcuts in HANA Studio?
- Go to -> Help -> Key Assists
- Alternately, press CTRL+SHIFT+L to get the list of Keyboard Shortcuts.
3. Pinning Option for code element documentation in HANA Studio
You can nail down the code component documentation ( Key F2 ) by choosing the ‘@’ button present in the popup as displayed underneath.
The nuances will be shown in ABAP Part Information View for your reference.A
4. How to retrieve the deleted program in SE38?
We have, by far most of the ABAPers know this tip as of now. If not, then, at that point, endeavor the under advances toward recuperate a deleted program.
- Make a program with a similar name as prior (which is erased)
- Click on “Utilities” – > “Adaptations” – > “Form The board”
- Select the adaptation of your previous program and snap in plain view
- Your previous program is shown here
Tip – The erased program probably been saved in a vehicle beforehand. Attempt, in the event that you can recover an erased program which was made as a neighborhood object.
Drifter assembles no greenery. The day you quit learning, you are stale. So continue learning and sharing.
YOU MAY BE INTERESTED IN
SAP ABAP HANA: Revolutionizing Enterprise Application