RE: [sap-dev] REUSE_ALV_GRID_DISPLAY Giving Error

Reply from TerryB on May 21 at 11:22 AM
John,
The reason for using a variable to pass to CALLBACK_PROGRAM is that SY-REPID changes to the main program of the called function as soon as program control enters the function. At that point your program has lost the reference to the intended callback program!
Cheers,
Terry

---------------Original Message---------------
From: john.louk
Sent: Monday, May 21, 2012 10:00 AM
Subject: REUSE_ALV_GRID_DISPLAY Giving Error

All of the version I have seen do not use SY-REPID. I still do not use it in the callback parameter. I just tested it in ECC6 and like Horacio said it compiles fine. My sample program works with it changed to SY-REPID.

All the version I have done prior (and thus still use this approach) is to create a variable (local or global doesn't matter) like SY-REPID. And, in the code, move SY-REPID into that variable and use that variable in the I_CALLBACK_PROGRAM parameter.

I believe this used to give errors on the SY-REPID but that could also have been backa few versions of SAP. Thanks to this question I now know I can go to SY-REPID. You issue could also be as some have suggested an issue with your copy and paste. Although with Horacio's copy and paste working it leans toward your copy and paste not being an issue. it sounds like something that your version does not like.

Cheers

John

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
TerryB  
Senior SAP Developer
achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Have an SAP Question? Ask Your Peers at Toolbox for IT

_.____.__

No comments:

Post a Comment