Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to convert an ABAP code to PSEUDOCODE

0 Likes
4,009

I was just seeking advice.

I was just seeking advice.

7 REPLIES 7
Read only

Sandra_Rossi
Active Contributor
0 Likes
3,481

I guess you want to parse your source code by running some ABAP code as you have entered ABAP development tag, so create an ABAP program which calls a parser. There are many free parsing software all around the world (https://en.wikipedia.org/wiki/Parsing#Parser_development_software). Enter the ABAP SELECT grammar somewhere, in BNF language for instance, and with your parser, parse the ABAP code based on this grammar, and return the result to your ABAP program.

Read only

abo
Active Contributor
3,481

Somehow I think the goal is a natural language explanation of that select 🙂

Read only

0 Likes
3,481

c5e08e0478aa4727abc4482f5be390b2 I think the goal of the OP is about how to convert SQL code into automatic specification.

Read only

0 Likes
3,481

No. In normal circumstances, one would create PSEUDOCODE first then create ABAP code.

In my case, the opposite - ABAP code was written first and now they want that ABAP code to be converted to PSEUDOCODE.

Read only

3,481

Maybe edit your question to provide an example of what "PSEUDOCODE" you want for the given ABAP code.

Read only

0 Likes
3,481

Well, by definition PSEUDOCODE is english like language. I am new at this. They want me to convert the ABAP code to English like language explaining what the code does.

I cannot post the whole program here - but if you give me your email I can send it to you.

Read only

0 Likes
3,481

"now they want that ABAP code"...who is they?

If you can not write out in "English" (ie non-technical terms) what your code actually is doing then you do not know your code and must have just copy-pasted it. Saying something like "This code selects the name, position, and company of an employee from their organizational and personal data records based on the employee ID matching in both." is much easier for a non-developer to understand and is "pseudo-code" but you can also define "pseudo-code" as an outline or rough draft of the code without being syntax specific. For example,
Select this that and the other fields from table1 and table 2 joined on field X into internal table ZZZ.

Sort ZZZ by field this.
Read the first 10 fields where field this = blah


that is also pseudo-code. It just depends on the level of abstraction you want.....excuse me....that THEY want.