2012 Sep 26 7:57 AM
Hi everybody,
I have a class on a SAP-System and I want to copy&paste it to a different SAP-System.
I have the entire coding copied from the source system. Looks like:
class ZE4U_IDOC_DATA definition
public
create public .
public section.
methods GET_SEGMENT
importing
...
returning
value(RTT_SEGMENT) type EDIDD_TT .
methods CONSTRUCTOR
importing
!X_IDOC_DATA type EDEX_IDOCDATA
!X_IDOCTYPE type EDI_ROUTID optional
!X_MESCODE type IDENTIFIER .
methods GET_UNH
importing
value(X_SEGMENT) type EDIDD
returning
value(Y_UNH) type /ISIDEX/E1VDEWUNH_1
exceptions
FORMAL_ERROR .
...
protected section.
types:
BEGIN OF sorted_idoc,
segnam TYPE edilsegtyp,
psgnum TYPE edi_psgnum,
tabix TYPE sytabix,
END OF sorted_idoc .
types:
reduced_idoc_table TYPE STANDARD TABLE OF sorted_idoc .
types:
sorted_idoc_table TYPE SORTED TABLE OF sorted_idoc
WITH UNIQUE KEY table_line .
...
private section.
methods ADD_STATUS_FORMAL
importing
!IM_MSGTY type SYMSGTY default 'E'
!IM_MSGNO type SYMSGNO optional
!IM_MSGID type SYMSGID optional
!IM_MSGV1 type ANY optional
!IM_MSGV2 type ANY optional
!IM_MSGV3 type ANY optional
!IM_MSGV4 type ANY optional
!IM_SEGMENT type EDIDD optional
!IM_SEGFLD type EDI_SEGFLD optional .
CLASS ZE4U_IDOC_DATA IMPLEMENTATION.
Unfortunatelly I can't find the buttons/how to navigate to the screen, where to see THIS generated coding.
Can anybody help me, how to navigate in SE24 or SE80 to see the generated coding?
Thanks a lot
Regards
Mario
2012 Sep 26 5:03 PM
Hello,
in SE24 you can enter function code SHOW_CLIF. This will start a report where you can download the complete class or seperate includes. It looks like that you can also upload it (Never tried).
Best regards,
Tapio
2012 Sep 26 8:04 AM
Use SAPlink Program to download and upload class code in SAP server. here is link for saplink
2012 Sep 26 8:32 AM
Hi,
helpful answer. But doesn't work for the moment. There must be another solution/way to find the coding.
Regards
Mario
2012 Sep 26 9:28 AM
Via the "goto" menu you can navigate to the separate public, protected and private code sections, is this what you are looking for? It might be possible to paste code there, have not tried it myself yet.
Thomas
2012 Sep 26 9:49 AM
Hi Thomas,
yes I know these buttons. But there is an editor-window where you can see the entire coding (as I posted on top ). Not only special sections.
We found the button yesterday. But today I am on a different system 😞 with different settings.
Maybe the editor settings have to be modified? I unfortunatelly can't find out
Regards
Mario
2012 Sep 26 10:01 AM
Internally these sections are stored in separate includes, so I believe there is no single editor window, or I would like to learn about it myself. Maybe there is add-on solutions providing this.
Thomas
2012 Sep 26 10:04 AM
2012 Sep 26 10:13 AM
Hi Raymond,
sorry no propriate solution fo me.
I extracted the coding you see on top yesterday in system A and I want to paste it today in system B.
Regards Mario
2012 Sep 26 10:50 AM
2012 Sep 26 1:49 PM
Hi,
Go to Class in Se24. Click on Utilities - >settings . Then select the check box 'Source Code based Class Builder' . Then in the tool bar of class you can see 'Source Code based ' button. You can toggle between source code based and Form based.
Hope this helps u.,
Regards,
Kiran
2012 Sep 26 2:09 PM
Nice find. I can see this on SAP_BASIS version 702, but not on 700. This might also explain the effect that Mario described (different behaviour in different systems).
Thomas
2012 Sep 26 3:11 PM
2012 Sep 26 5:03 PM
Hello,
in SE24 you can enter function code SHOW_CLIF. This will start a report where you can download the complete class or seperate includes. It looks like that you can also upload it (Never tried).
Best regards,
Tapio
2012 Sep 27 6:36 AM
Hi Tapio,
good hint. I tried to upload. Altough there is a Upload-button and a save button. The class was not saved.
Did you check how it works?
Regards
Mario
2012 Sep 27 7:17 AM
Hi Mario,
no I never tried to Upload. Maybe you have to upload each Include sperately?
I use this option for documentation purposes only. If I need to transfer classes without transport system I use SapLink.
Best regards,
Tapio
2012 Nov 16 3:41 AM
I don't know if you solved. In case you didn't, here's how I do it:
1. Create a temporary report and paste the contents of the .txt file (the whole class)
2. Replace all ocurrences of ZE4U_IDOC_DATA with a local name, e.g. LCL_ZE4U_IDOC_DATA.
3. If the addition CLASS-POOL is present (I don't see it in your code), remove it.
4. Remove the addition PUBLIC after DEFINITION
5. Activate the report.
6. In SE24 there is an option to import local classes (don't remember the exact menu path now), when you enter your report it should recognize LCL_ZE4U_IDOC_DATA. There you can rename it as ZE4U_IDOC_DATA and import it as global. Finally you can delete the temporary report.
Hope it helps.
Regards