ā2015 Apr 23 5:05 AM
Hi,
I am new to SAP and ABAP in Eclipse. we are using SAP GUI for abap so far and recently started moving to Eclipse editor for abap
now i want to know is there any feature available in eclipse resemble to SAP GUI pattern->structure data object -> with fields from structrure.
we are using eclipse LUNA and here are the screenshots of SAP GUI
Is this feature available in eclipse also? if yes then give me some idea about it.
Thanks in advance.
ā2015 Apr 23 7:47 AM
Hi Zubin,
sorry, these patterns are currently not available in Eclipse. We only have standard patterns like CALL METHOD and CALL FUNCTION which is available via the code completion.
We have the patterns already in the backlog. So it is a matter of time when these things are available for you.
Regards,
Thomas.
ā2015 Apr 23 7:47 AM
Hi Zubin,
sorry, these patterns are currently not available in Eclipse. We only have standard patterns like CALL METHOD and CALL FUNCTION which is available via the code completion.
We have the patterns already in the backlog. So it is a matter of time when these things are available for you.
Regards,
Thomas.
ā2015 Apr 23 7:56 AM
Hi Zubin,
additional question. In which usecases do you generate such structures in ABAP via the pattern?
Regards,
Thomas.
ā2015 Apr 23 11:14 AM
while creating report, we often use pattern in this way. Usually in report we dont need all columns from specific table, instead we take few number of columns from more than one table for our calculation etc for that we generate above structure and Replace "DATA" With "TYPES".
so this types helps to create internal table and work area of relative type.
ā2015 Apr 23 11:47 AM
Hi,
Even we use the feature a lot in our development scenarios, it helps us to create big structures easily and quickly rather than writing it individually in eclipse. I hope this feature will be available in eclipse soon.
ā2015 Apr 23 12:16 PM
Hi,
what exactly is the new structure and table type used for?
I could imagine something like this:
SELECT fldate planetype FROM sflight INTO TABLE itab.
where you need a structure and a table type declaration like:
TYPES: BEGIN OF line,
fldate TYPE sflight-fldate,
planetype TYPE sflight-planetype,
END OF line.
DATA itab TYPE STANDARD TABLE OF line.
or is your use case different?
Regards,
Michael
ā2015 Apr 24 7:41 AM
@Michael Gutfleisch: yes this is my case.
HERE IS MY SAMPLE PROGRAM
TYPES :BEGIN OF TY_VBAK,
VBELN TYPE VBAK-VBELN,
ERDAT TYPE VBAK-ERDAT,
AUDAT TYPE VBAK-AUDAT,
VBTYP TYPE VBAK-VBTYP,
NETWR TYPE VBAK-NETWR,
WAERK TYPE VBAK-WAERK,
BUKRS_VF TYPE VBAK-BUKRS_VF,
END OF TY_VBAK,
DATA : IST_VBAK TYPE TABLE OF TY_VBAK,
WA_VBAK TYPE TY_VBAK.
SELECT VBELN ERDAT AUDAT
VBTYP NETWR WAERK
BUKRS_VF
FROM VBAK
INTO TABLE IST_VBAK.
ā2015 Apr 24 8:06 AM
With Release 7.40 SP5 and higher you can use the new Open SQL syntax and just write:
SELECT fldate, planetype FROM sflight INTO TABLE @DATA(itab).
which implicitely declares the variable itab.
followed by...
LOOP AT itab INTO DATA(line).
which implicitely declares the variable line
or ...
LOOP AT itab ASSIGNING FIELD-SYMBOL(<line>).
which implicitely declares the field-symbol <line>.
Would that help?
Regards,
Michael
ā2015 Apr 24 10:39 AM
@Michael: It would be helpfull but we are using lower version 7.3 and there is no chance for upgradation in near future. so any other idea?