‎2007 Oct 15 4:30 PM
Hello all,
I want to add one more field at the data declaration level.
I am following below steps :
1) I went to report and clicked on 'Enhance' button.
2) Then I went to Edit->Enhance Operations->Show Implicit Enhancement Options
3) Then I went to the Data Declaration section and right clicked and choose 'Enhancement Implementation'->Create.
4) Then I declared my variable.
5) When I checked the syntax, it gave me error.
Below is the piece of code.
data: begin of austab occurs 100,
ikone TYPE c,
lgtyp like lagp-lgtyp,
lgpla like lagp-lgpla,
kreuz type c, "ind. to be invented
kzpmi type c, "ind. Plus Minus Initial
idatu like lagp-idatu,
werks like lqua-werks,
matnr like lqua-matnr,
charg like lqua-charg,
flg_aktiv type c, "ind.
nidat like lagp-idatu, "New Inventory date
ttext(25) type c, "Textfield
sperr type c, "ind. blocked due to transfer
kzmmq type c, "ind. bin with several quants
iverz(1) type c,
linno like sy-linno,
pagno like sy-pagno,
lqnum like lqua-lqnum, "new
lgnum like lqua-lgnum, "new
plpos like lqua-plpos, "new
""""""""*""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Struct. AUSTAB, End S
*$*$-Start: (1 )--------------------------------------------------------------------------------$*$*
ENHANCEMENT 3 CYCLE_COUNTING. "inactive version
abcin type abcin,
ENDENHANCEMENT.
*$*$-End: (1 )--------------------------------------------------------------------------------$*$*
end of austab.
The error I am getting is "Comma without preceding colon (after ABCIN ?).
Please help me out in solving this .
Thanks,
Salil
Code Formatted by: Alvaro Tejada Galindo on Jan 14, 2010 5:44 PM
‎2007 Oct 15 4:34 PM
Which is the program you are trying to enhance and how is ABCIN declared? Can you try declaring something of type CHAR and see once if you still are getting error?
‎2007 Oct 15 4:36 PM
‎2007 Oct 15 4:37 PM
I tried declaring it using CHAR, but still the error remains the same.
‎2007 Oct 15 4:55 PM
I have found these steps for Implicit Enhancements. Can you check if oyu have followed the same way?
Prerequisite:
1. Create Composite Enhancement Implementation in your own package (In SE80 open your package, right-click and select Create -> Composite Enhancement Implementation)
2. Giive a name and description for the Composite Enhancement Implementation
Implementation:
1. Open the development object (SAP standard program) you want to enhance in ABAP editor.
2. Click the "Enhance" button (the spiral Icon). The Change Enhancements editor opens up.
3. Chose the menu path Edit -> Enhancement Operations -> Show Implicit Enhancement Options. The implicit enh options are shown in the code with comments such as """""""""""""""""$"$SE:(1 ) I"
4. Highlight the entire line of the Implicit Enhancement Options.Right-click to select the contaxt menu path Enhancement Implementation -> Create
5. In the popup screen enter a (Simple) enhancement name and description. Assign this to a composite enhancement.
6. On clicking the enter button on the popup screen the code ENHANCEMENT and ENDENHANCEMENT gets inserted. You can add your code there.
Also check this link if it helps -
http://help.sap.com/saphelp_nw2004s/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm
/people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
/people/thomas.weiss/blog/2006/03/15/the-new-enhancement-framework-part-2--what-else-you-need-to-know-before-building-an-enhancement
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/thenewEnhancementFrameworkandthenewkernel-basedBAdI&
ashish
‎2007 Oct 15 10:01 PM
Hello,
Regarding the following:
ENHANCEMENT 3 CYCLE_COUNTING. "inactive version
abcin type abcin,
ENDENHANCEMENT.
My guess is that abcin in not defined as a type.
I searched for abcin in RLINV060 in our system and did not find it.
Also once you get past the syntax error remember to activate the enhancement.
Regards
Greg Kern
‎2007 Oct 17 8:56 PM
‎2007 Dec 13 10:09 AM
Would have been nice if you told us how you solved it, I have the exact same question
‎2010 Jan 14 10:43 PM
Hi,
Can you please advice what you did to resolve this? I have the same issue now.
Regards,
Kumar.
‎2010 Jan 14 10:43 PM
Hi,
Can you please advice what you did to resolve this? I have the same issue now.
Regards,
Kumar.
‎2010 Jan 14 10:58 PM
I have resolved this by putting all the required fields into a structure (SE11) and the include the structure before the End of Types. as follows.
TYPES: BEGIN OF STANDARD_SAP_STRUC.
TYPES: box TYPE c, -> SAP FIELD
stunr LIKE ek08bn-stunr, -> SAP FIELD
zaehk LIKE ek08bn-zaehk, -> SAP FIELD
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Typ MRM_ARSEG, End S
$$-Start: (1)----
$$
ENHANCEMENT 1 Z_TEST_ENHANCEMENT. "active version
*
INCLUDE STRUCTURE YKMRM_STRUC. --> THIS IS MY NEW STRUCTURE WHICH CONTAINS MY ADDITIONAL FIELDS
ENDENHANCEMENT.
END OF STANDARD_SAP_STRUC
Edited by: Kumar Kasavaraju on Jan 15, 2010 12:04 AM
‎2010 May 10 8:29 PM
Correct process is to use :
ENHANCEMENT 1
data: field type data_type,
field2 type data_type2.
ENDENHANCEMENT
This is because the enhancement is not actually where it looks to be, but rather off in another program that is co-compiled.
‎2015 Mar 19 2:55 PM
Thank you for this discussion.
The trick to avoid the syntax error is to start the enhancement with a data: statement.
Best regards,
Michael