on 03-14-2024 7:45 AM
Dear ABAP Cloud Experts,
Currently I am working in migrating the Old BW flows to BW Bridge.We have many SE38 programs and Include programs in BW System. But while moving the programs from BW system -> GITHUB -> BW Bridge Cloud system. The Programs are not able to move and I am getting the message as
Object type PROG not supported in SAP Cloud Platform, ABAP Environment. The import of this object is skipped.
Could you please guide me, what is the replacement of SE38 programs and include programs in ABAP Cloud.
Thanks.
Hi Vincent801,
ABAP programs were used during a time where object oriented development was not so popular. In ABAP OO they should be not used.
For the ABAP Cloud you have all objects which are supported here: https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/index.htm?file=abenreleased_apis.htm
I would propose to convert the program, you simply create a class and there in this class you implement the interface IF_OO_ADT_CLASSRUN
As example:
CLASS zprogram_demo DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_oo_adt_classrun.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zprogram_demo IMPLEMENTATION.
METHOD if_oo_adt_classrun~main.
out->write('Hello ABAP Cloud World!').
ENDMETHOD.
ENDCLASS.
Best,
Edrilan Berisha
SAP S/4HANA Cloud Financials Development
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much Edrilian for the quick reply and the sample program. I ran your program with the Option Run As -> 1. ABAP Application (console) and i am getting the result correctly.
For function Modules, I dont have option to Run As -> 1. ABAP Application (Console). Sample function module Code attached below. Could you please guide me how to execute Function Modules in Eclipse ?
function zfm_operator
importing
num1 type string
num2 type string
operator type c
exporting
sum type string.
if operator = '+'.
sum = num1 + num2.
elseif operator = '-'.
sum = num1 - num2.
elseif operator = '/'.
sum = num1 / num2.
endif.
ENDFUNCTION.
Hi Vincent801,
what are you trying to achieve? You want to implement a function module in ABAP Cloud? If yes I would refrain from that, function modules just like programs are from pre-ABAP OO time. We do not use them in current development as they are outdated. I would rewrite and implement the coding in a new method so instead of function zfm_operator, you create a method in your class called METHOD operator. If you want to call a remote function module you find a blog post here: https://community.sap.com/t5/technology-blogs-by-members/call-a-remote-function-module-rfc-from-sap-...
Best, Edrilan Berisha
User | Count |
---|---|
83 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.