cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Which function call returns 0? in sap abap

View Entire Topic
Dennis_Suck85
Participant
0 Kudos

Dear Sushmithanaveenanthea,

depending on the context in which you're looking for
such a function, there are a large number of functions
in ABAP that can return 0.
For example, the standard function STRLEN returns 0 if
the string is empty:

Dennis_Suck85_0-1747824073088.png

Another similar example would be determining the
table size:

Dennis_Suck85_1-1747824099830.png

Both of these examples return 0 as a count, but most
functions return a return value indirectly, via the SY-
SUBRC, indicating whether the call was successful or
not:
Example of successfully reading a record from a table:

Dennis_Suck85_2-1747824125636.png

Maybe you are looking for a function that returns zero
to see which data type is used by default?

In this case, I have moved the last example into a
function that uses the return value of the type from SY-
SUBRC:

Dennis_Suck85_3-1747824158378.png

This is what the FUBA call looks like:

Dennis_Suck85_4-1747824186260.png

I hope these examples will help you.


Best regards,

Dennis

Sandra_Rossi
Active Contributor
0 Kudos
As the question doesn't explain the context, but you are able to give a detailed answer about one possible context among many, I guess you are using GenAI to generate it. Be aware that you must indicate it as explained at https://pages.community.sap.com/resources/rules-of-engagement > Article 3: Content Publication: "If you want to publish content that was helped/created by GenAI, you must add the user tag GenAI Assisted Content. For content where it's not possible to add a user tag (e.g., answers), you must include this statement: "GenAI was used to help generate this content.""
Dennis_Suck85
Participant
0 Kudos
Thanks @Sandra_Rossi for the comment, just added my examples.