GP: How to keep action sleeping until ABAP function module raises event
Hello experts,
I'd like to develop a gp process which contains a callable objects which keeps the process instance waiting until an abap function module send something like an event.
I don't want to put too much load on the machine and block expensive JCO ressources.
Does anyone have an idea how to solve this?
Thanks very much
Stefan
Hi Mike,
GREAT! Many thanks! Sometimes solutions may be so simple.
For all others who have the same problem a bit more in detail:
In your FM just enter as exception: CX_BO_ACTION_CANCELLED and mark 'Exceptn. Classes'.
Declare your class method with the exception cx_bo_action_cancelled.
In your class method just enter your FM via the 'Pattern'-Button.
The Pattern will show only the Import- and Export-Parameters but not the exception (class).
Regards,
Georg
Similar Messages
-
How to keep field as mandatory in function module
I have one field in import parameter can you please suggest how to keep it as mandatory
ThnxIn IMPORT parameter tab you have one checkbox OPTIONAL, if you check it that field will be optional otherwise it is mandatory.
Best Regards,
Vibha
*Please mark all the helpful answers -
How to run ABAP Function Module in Background Wchich Takes Long Time to Run
How to run ABAP Function Module in Background FOR LONG TIME
I am not that experienced with ABAP. I am on SAP BI 7.0. I WANT TO RUN A FUNCTION MODULE
RSDRT_INFOCUBE_DATA_COPY.
I used SE37 and then executed the module, I supplied the parameters on the form which opped-up and then program started running. . Program was however interrupted after 10 minutes by ABAP. How can I run it in background without interruption?
THANKS A LOT.Hi,
You can call this FM in a program and run that program in background.
Regards,
Raju -
Call ABAP function module from script?
Hi,
I have an ABAP function module, which works fine when I call it in a transformation.
Since I don't need to execute this function for each record but rather for each file I process, I would like to move the call from the DataFlow to a script in the WorkFlow. When I click on the 'functions' button the ABAP FM is available in my SAP Datastore, so I drag and drop it into my script. I also make sure to populate all required variables.
There are no error messages or warning when I check my job definition.
When I execute it, I get the following RFC error:
Function call <xxx ( abcd ) > failed, due to error <150413>: <RFC CallReceive exception <FUNCTION_NOT_FOUND>.>.
Is it just not possible to call an RFC enabled function module in SAP from a script or am I doing something wrong here?
Thanks,
Jan.Could you please let me know how I can call an abap function module from a transformation? (from abap xslt program). I know how we can call methods of a class from the transformations, but no idea how we can call function modules. Any suggestions or a sample code snippet towards this will be very useful for me.
Thanks,
Shashi. -
Passing an XML file from WebDynpro app to ABAP function module
Hi all,
I'm stuck with a problem, and am hoping one of you could let me know how to proceed:
I need to pass an XML file (or at least the entire content of the XML) from my WebDynpro application to a backend ABAP function module. What I tried was this:
In my WebDynpro app, I read the XML and convert the content into one long string (using java.io.FileReader and java.io.BufferedReader). In my ABAP function module I created an import parameter of type String. I then imported the ABAP Function module into my WebDynpro app as a model. I then tried to pass the XML string to the ABAP module. What happens is this:
If the size of the string (XML) happens to be less than 255 characters, then it works. That is, the string is passed to the ABAP function module and I can see the contents. However, if the XML string happens to be greater than 255 characters, then it does not work. The string at the ABAP side is empty. Surprisingly, the ABAP module does not throw an error either. It just displays an empty string.
Could you please tell me what the problem is?
Thanks & Regards,
BijuHi Biju ,
Welcome to SDN.
If the import parameter is defined as type string it should work, however did you check whether your application pass it properly?
I have applications using strings as import parameters working fine. (webapplications (BSP) to RFC)
Regards
Raja -
Issue in creating web service for a ABAP Function Module
Hi,
now i'm learning how to create web service for a ABAP Function Module. I used the following steps.
1. select the Function Module, named "zws_test".
2. in the context menu, select "create->proxy object". so we enter into wizard.
3. in the wizard, press the radio button "Service Provider".
4. in the next page, press the radio button "Existing ABAP Objects(Inside Out)".
5. In the next page, Enter the "zws_test_prvider" as Service Definition and select "Function Module" as Endpoint Type.
6. in the next page, enter "zws_test" as Function Module and mark the "Mapping der Namen" button
7. in the next page,select "PRF_DT_IF_SEC_LOW" as Profile and mark "Deploy Service".
8. Save in the local package.
9. then it will pop up a window with title "WSDL Source". i selected "URL/HTTP Destination" and press "OK".
10.in the next page, i enter the URL as "http://hostname:portnumber/", and press "OK".
11. then it will pop up a window with title "Display logs". A record with error message "HTTP error(return code 404, message "Not found")" appears.
12. i press "ok" and a service provider with name "zws_test_prvider" appears in my local package.
13. i use "zws_test_prvider"'s URL to create a service consumer "ZCO_WS_TEST_CONSUMER" and logic portal "LP1".
14. But when i test my service consumer "ZCO_WS_TEST_CONSUMER", it will throw an exception "cx_ai_system_fault" with errortext "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/".
15. I use t-code SM59 to test connection and get the following info.
Status HTTP Response 200
Status Text OK
Duration Test Call 328 ms.
who can give me the reasons about item 11 and 14, and explain me how to create service provider and service consumer for a Function Module.
Thanks in advance
Johnneyhave you seen this weblog
/people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices -
ABAP Function Modules are available to Crystal Reports through the SAP Integration Kit. The look like tables when listing them in the Database Expert.
How do you use them? Specifically, I am trying to use READ_TEXT to retrieve into a report the contents of STXL.
Thanks!
LuisConnect the following fields in the database expert:
STXL
TDOBJECT
TDNAME
TDID
TDSPRAS
TO FOLLOWING CORRESPONDING FIELDS OF READ_TEXT
I_OBJECT
I_NAME
I_ID
I_LANGUAGE
LATER USE "T_LINES.TDLINE[Text Line]" as output. -
Calling an ABAP function module
Hi friends,
I am developing an application in EP6 SP2 using JSPDynPage from which, want to call an ABAP function module that returns table and show the values from this table in this application.
I went thru various blogs and APIs. I am confused between SAP JCO, JCO client service and connector framework. Do u have any documentation on how to connect to R3 systems and call a function module, retrieve results etc.
Regards,
NilzJCo is the point to start. This gives you low level access to all rfc functions. Everything else (accept BSP and Web dynpro) are just layers of encapsulation around the low level JCo function.
The steps are always like this:
call the sap system for rfc login
prepare data areas and call in java
call the rfc in the R/3 system
handle exceptions
logoff and free ressource
continue with data obtained in R/3
There is a lot of material around jco. One book that is fairly ok is :
SAP Interface Programming
A comprehensive reference for RFC, BAPI, and JCo programming
J. Meiners, W. Nüßer
SAP PRESS ISBN 1-59229-034-5
This helps you navigate through the wealth of information also at SDN -
Call an ABAP Function module on click of Button in BSP page
Hello ,
i would like to run a ABAP function module on click of a button in BSP page.
or in other words i want a Funtion module ex: 'test1' to run after clicking this button ex: 'button1'
and how to pass the values for a function module after clicking the button.
i an new to bsp application .
Can anyone help me on this .Hi Shalaxy,
Triggering a URL to WDJ:
I suppose the URL of WDJ app. is also a portal URL. I assume that from a BSP application inside portal you need to trigger the WDJ url.
But the catch is that you cannot hotcode this URL, since it varies for a development, quality and production systems(diff. portal environments).
To solve this issue, ABAP provides a system variable named sy-sysid, which says want system your ABAP system is, normally a development R/3 system will be associated to development portal system and quality R/3 to quality portal ans so forth.
So you could have a internal table/db table/ variable for dev, quality or prod portal urls and from the bsp on button click based on the value in the sy-sysid you can trigger the url accordingly.
Creating a URL in WDJ
The above is about triggering a WDJ from BSP. But if you dynamically want to create a link in WDJ on a button click, then apparently you could not do that from BSP, since the applications are different. All you could do is to pass some URL parameters to WDJ application from BSP app. Then based on the URL parameters the WDJ application has to dynamically create a link and add it to its application.
Hope it helps.
Regards,
Maheswaran
Edited by: Maheswaran B on Mar 1, 2010 4:17 PM -
ABAP Function Module Example to move data from one Cube into Another
Hi experts,
Can any please help out in this ..?
A Simple ABAP Function Module Example to move data from one Cube into Another Cube
(How do i send the data from one client to another client using Function moduel).
Thanks
-Upen.
Moderator message: too vague, help not possible, please describe problems in all technical detail when posting again, BI related? ("cube"), also search for information before asking.
Edited by: Thomas Zloch on Oct 29, 2010 1:19 PMThis is the start routine to duplicate records in two currencies.
DATA: datew TYPE /bi0/oidateto,
datew2 TYPE rsgeneral-chavl,
fweek TYPE rsgeneral-chavl,
prodhier TYPE /bi0/oiprod_hier,
market TYPE /bic/oima_seg,
segment TYPE /bic/oizsegment.
DATA: BEGIN OF S_DATA_PACK OCCURS 0.
INCLUDE STRUCTURE /BIC/CS8ZSDREV.
DATA: END OF S_DATA_PACK.
S_DATA_PACK[] = DATA_PACKAGE[].
REFRESH DATA_PACKAGE.
LOOP AT S_DATA_PACK.
move-corresponding s_data_pack to DATA_PACKAGE.
if DATA_PACKAGE-loc_currcy = 'EUR'.
DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
DATA_PACKAGE-CURRENCY = 'USD'.
APPEND DATA_PACKAGE.
DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalloc.
DATA_PACKAGE-CURRENCY = 'EUR'.
APPEND DATA_PACKAGE.
else.
DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
DATA_PACKAGE-CURRENCY = 'USD'.
APPEND DATA_PACKAGE.
endif.
ENDLOOP.
This is to load Quantity field
RESULT = COMM_STRUCTURE-BILL_QTY.
This is to load Value field
RESULT = COMM_STRUCTURE-NETVAL_INV.
UNIT = COMM_STRUCTURE-currency. -
ABAP Function Module table into crystal
Hello,
I created a ABAP Function Module with one export parameter(a structure), and another table paramemter(with table type of identical to a table in sap).
I wrote a simple select statement and dumped the data into the internal table which I am passing it as table parameter.
However when I access that function module from crystal, I only see export parameter(structure) with one record, BUT I DO NOT SEE the internal table(table parameter) AT ALL.
I tried various ways of passing,but crystal doesn't seem to be recognizing the table parameter at all.
I pulled the f_union shich shows up in crystal,but it is not returning any values at all.
How do I pull in a function module's table parameter into crystal?
Thanks
KumarPlease re-post if this is still an issue to the Business Objects Integration Kits - SAP Forum or purchase a case and have a dedicated support engineer work with you directly
-
Details about ABAP Function Module
Hi All,
I am trying to get information about the data returned by 2 ABAP function modules. These are :-
1) TH_WPINFO - Shows the number of work processes running on the SAP system. The table fields are:-
WP_NO
WP_TYP
WP_PID
WP_STATUS
WP_WAITING
WP_SEM
WP_RESTART
WP_DUMPS
WP_CPU
WP_ELTIME
WP_MANDT
WP_BNAME
WP_REPORT
WP_ACTION
WP_TABLE
WP_SERVER
WP_WAITINF
WP_WAITTIM
2) TH_WP_DETAIL_INFO - Shows the additional details about a particular work process. The table fields are:-
EYEON
STARTTIME1
STARTTIME2
ENDTIME1
ENDTIME2
RESPTIME
ROLLED_OUT
CPUTIME
QUEUETIME
GUITIME
GUICNT
GUINETTIME
L_ENDTIME1
L_ENDTIME2
RFCTI
RFCCNT
INPUTLEN
OUTPUTLEN
MAXROLL
MAXPAGE
ROLLINCNT
ROLLINTI
ROLLOUTCNT
ROLLOUTTI
LOCKCNT
LOCKTI
READDIRCNT
READDIRTI
READDIRREC
READDIRBUF
READSEQCNT
READSEQTI
READSEQREC
READSEQBUF
PHYREADCNT
INSCNT
INSTI
INSREC
PHYINSCNT
UPDCNT
UPDTI
UPDREC
PHYUPDCNT
DELCNT
DELTI
DELREC
PHYDELCNT
COMMITTI
DBPROCCNT
DBPROCTI
GENERATETI
REPLOADTI
CUALOADTI
DYNPLOADTI
SRCLODCNT
DSQLCNT
QUECNT
QUETI
DDICTI
MEMSUM
PRIVSUM
USEDBYTES
MAXBYTES
MAXBYTESDI
ADCNT
ADTIME
DISPCNT
ACCOUNT
TRANSID
TERMINAL
REPORT
DYNPRONR
TCODE
CUAPRG
CUAFUNC
DIA_FILL_1
EYEOFF
As you can see, the tables shown by these function modules have lots of columns but there is not much description (In fact, nothing at all) about them. If anybody has used these function modules before can you please point me to a location where I can find documentation for these. I have already searched on SAP help portal but it doesn't show any information about this. I tried with TCODE SM50 on my SAP GUI but it doesn't give precise information. Please suggest on how or where I can find description for these tables.
Many Thanks in advance!!!
- JohnHi John!
There is no documentation - you can't expect, that <i>every</i> bit is documented in SAP.
If you are interested in something special, ask this - but I doubt that you will find someone, who writes a FM documentation based on his own experience.
The most important fields you can guess by the name or comparing with SM50 / SM66.
Regards,
Christian -
Web Dynpro Java Internationalization and backend ABAP function modules
Friends,
I have a requirement where I want my Web Dynpro Java application to support BRAZIL and CHINESE.
I have been through the sample programs and tutorials and I understand how to support my application in these 2 languages. The challenge I am facing is how to communicate the language to the backend code (ABAP function modules) so that the function modules can written language specific error messages and texts.
I searched SDN but could not find anything. Your help is appreciated.Prashant,
When you are configuring JCo connection in WebDynpro Content Administrator, just left language settings blank for metadata connection (you may do the same for data connection). Now WD will supply language of currently logged-in user when obtaining connection settings from system landscape and you'll get necessary functionality.
By default locale of user determined by parameter sap-locale (sap-locale=de_DE for example), settings of user's browser and lastly preferences of user stored in UME.
Btw, BRAZIL (or Portugees for this matter) is not fully supported language by SAP, so R/3 side may be not translated or partly translated.
Valery Silaev
SaM Solutions
http://www.sam-solutions.net -
Importing (ABAP Function Module) into my Software component
How to import a ABAP Function Module into my Software component
first step is
Check your func. Module is remotely enabled or not?
if it is remotely enabled then you can import using steps provided by michal and
bhavesh,
if it is not remotely enabled, go to the concern r/3 system and go to the
func. module and go to the attributes tab and check the remotely enabled option
and activate it,
then go to the xi system and follow the steps specifed by bhavesh. -
How do we trap exception inside the function module?
How do we trap exception inside the function module?
Use ABAP Help - CATCH, RAISE for starters. Or take a look at an existing function module, for example.
Maybe you are looking for
-
URGENT!! where to put com.oreilly.servlet package??
hi all, i am now using tomcat. i put the com.oreilly.servlet classes in the following path: c:\jakarta-tomcat-4.0.3\webapps\temp\web-inf\classes\com\oreilly\servlet\.. and i put my servlet file in the path c:\jakarta-tomcat-4.0.3\webapps\temp\web-inf
-
I am trying to extract two more fields from 2lis_13_vditm
Dear Experts, I have some tough situation here. In BW: i am using 2lis_13_vditm this datasource for the last 5 years. i am running daily deltas to load(10 fields from r/3) ods which is in <b>addition mode.</b>. from this ods data is going to another
-
Unable to assign the service material to campaign
Hi Experts, When i tried to assign service material to Campaign for giving offers to customers through Campaign i am getting below error. Can anybody help me to solve this issue. error: Invalid Parent Category for product SRV_BALANCING Regards Nagara
-
Hi I need to move my data from a time capsule that backuped my Macbook Air (which has been destroyed by liquid damage) to my Macbook Pro. The Air and the Pro both run Mountain Lion and I have a clean installation on the Macbook Pro. I used Migration
-
Tax jurisdiction code in the billing document
Dear All, How can I introduce tax jurisdiction code in the billing document of SD module?? Please help me. Thanks in advance