cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Query and ABAP code

0 Kudos
187

Good afternoon.

Please tell me how to correctly write the encoding in the sq report, swears at see below. Added the mseg table to the field groups, pulled all the fields into alv, the fields come out correctly, but the fields when checking the encoding does not determine why what else needs to be done?

My task is to delete reversal documents

Encoding

clear: smbln, sjahr, smblp.
select single mblnr mjahr zeile
from mseg
into (smbln, sjahr, smblp)
where smbln = mseg-mblnr
and sjahr = mseg-mjahr
and smblp = mseg-zeile.

check smbln is initial.
check mseg-smbln is initial.

jmodaal
Active Contributor
0 Kudos

Hello,

you can increase the chance to get an answer if you attach a screenshot with error messages in English.

0 Kudos

Good morning jmodaal. I switched the SAP login to English, I didn't immediately think that you wouldn't understand, I'm sorry.

I don’t want to remove them from the database, I just don’t want them not to appear in my report. This ABAP code should have helped me with this task, but I am missing something.

jmodaal
Active Contributor
0 Kudos

Hello,

I'm not sure whether your approach is suitable to get what you want, but to overcome the error message of the syntax check: it seems there is no data declaration for field SMBLN. It has to be added in the 'DATA' code section.

0 Kudos

Please tell me on my example how to write the code correctly, I'm still a newbie in programming

jmodaal
Active Contributor

Hello,

for fields that you use, add a field declaration in the 'DATA' code section of the Infoset so that these fields can be used in later code sections (like you do it here in the "Record processing" section).

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Thank you so much