SAP Script - calling SAP layout set from ABAP/4
Hi,
Help me in calling SAP layout set from ABAP/4
Thanks
Ashish,
create a driver program
create a script
A script is called using the function modules open_form,write_form,close_form.
Check this dummy program.
REPORT ZF3 .
tables makt.
data:begin of imakt occurs 0,
matnr like makt-matnr,
spras like makt-spras,
maktx like makt-maktx,
end of imakt.
DATA : ITEXT LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA : TEXTNAME LIKE STXH-TDNAME.
select matnr spras maktx from makt into table imakt up to 100 rows where
spras = sy-langu.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZF3'
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT IMAKT.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'MAIN'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
K.Kiran.
Similar Messages
-
Good day experts,
We have a requirement to add privileges to users in IDM via a call from a SAP GRC system
Does anyone have example code of such a call in an ABAP function module?
Thanking you in advance,
Johan KriekMartin,
Thanks for your reply.
I tried the Web Service way of doing it, seems to be working alright but again it comes with all the security issues and all around the Web Service.
I am exploring the use of JCO RFC Service provider, to call a JAVA program from ABAP. Hopefully that should work.
Thanks again.
John Miller -
As I can call to a API from ABAP (46C) ?
Hello.
As I can call to a API from ABAP (46C)?
Any idea?
THANKS.The answer to that question really depends upon the SAP WebAS (or Basis as it used to be known) release you are on.
Did you have a look at the weblog mentioned earlier in this thread:
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
It shows some examples on 620 and 640. Let us know what you have to work with, and we will see if we can help. -
IP - Is it possible to call exit planning function from ABAP Report..
Hi All,
Greetings.
Is it possible to call exit planning function from ABAP Report (t-code SE38) ? Or I mean is not limited only to be called from ABAP Report, perhaps from BSP / Web-Dynpro / Function Module.
If somebody here has been doing it before, I'm keen to ask to kindly share it. Particularly how to call and transfer data to that exit function.
Or if somebody has done in BPS, appreciate if it can be shared too .
Thanks a lot and have a good day,
Best regards,
Daniel N.Hi.
You can achive this as suggested by Mattias in your previous post.
Lets say you have next data structure:
CostCenter | Amount | PercentForDistibution |
Create input ready query in this format. Restrict cost center by variable type range.
Create WAD with analysis item.
When you run web page you enter range of cost centers (lets say you will enter 101004 to 101010).
I assume you have data only for 101004 in your cube (lets say 1000).
You will see only one record in your webpage.
CostCenter | Amount | PercentForDistibution |
101004 | 1000 | NOTHING
When you create WAD in analysis item properties set "NUMBER_OF_NEW_LINES" to lets say 1 (so in WAD you will see always one blank line for entering new data).
Just add 6 new records:
CostCenter | Amount | PercentForDistibution |
101005 | NOTHING| 10
101006 | NOTHING| 30
101007 | NOTHING| 20
101008 | NOTHING| 25
101009 | NOTHING| 5
101010 | NOTHING| 10
Then run planning FOX function like this:
FOREACH Z_COST_CENTER.
IF {Amount, Z_COST_CENTER} <> 0
Z_AMNT_TO_DISTRIBUTE = {Amount, Z_COST_CENTER}.
ENDIF.
ENDFOR.
FOREACH Z_COST_CENTER.
IF {PercentForDistibution Z_COST_CENTER} <> 0.
{Amount, Z_COST_CENTER} = Z_AMNT_TO_DISTRIBUTE * {PercentForDistibution Z_COST_CENTER}.
ENDIF.
ENDFOR.
It is not perfect FOX, but as an idead, it should work.
Regards. -
How to save the output of sap script in sap so that can be retrieved later
hi abapers
how to save the output of sap script in sap so that can retrieve the saved document later.
i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
how to use dms
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Dec 26, 2008 11:01 AMHi Deepika,
Look into this link https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/401cca81-b861-2910-ada2-f416dfb3b3fe
Regards,
Pravin -
How to call a sub screen from abap report
Hellow friends,
how to call sub screen 1001 prog name SAPLMGD1
and main program SAPLMGMM screen 4000 of tcode MM02.
i need to call the sub screen from abap reportHi Rajesh,
You can use FM MATERIAL_MAINTAIN_DIALOGUE to go to subcreen MRP1 in MM02.
Please check this sample code from other thread and enter 'MRP 1' for p_dytxt.
REPORT zsritest.
TABLES mara.
DATA: lv_bilds LIKE t133a-bilds,
ls_t130m LIKE t130m,
ls_rmmg1 LIKE rmmg1,
lwa_view TYPE mbildtab,
lwa_auswg TYPE mgauswg,
lt_views TYPE STANDARD TABLE OF mbildtab INITIAL SIZE 0,
lt_auswg TYPE STANDARD TABLE OF mgauswg INITIAL SIZE 0.
PARAMETERS: p_matnr LIKE mara-matnr,
p_werks LIKE marc-werks,
p_dytxt LIKE mbildtab-dytxt.
SELECT SINGLE * FROM mara WHERE matnr EQ p_matnr.
CHECK sy-subrc EQ 0.
CALL FUNCTION 'T130M_SINGLE_READ'
EXPORTING
tcode = 'MM02'
kzrfb = 'X'
IMPORTING
wt130m = ls_t130m
EXCEPTIONS
not_found = 1
wrong_call = 2
OTHERS = 3.
CALL FUNCTION 'BILDSEQUENZ_IDENTIFY'
EXPORTING
branche = mara-mbrsh
materialart = mara-mtart
tcode_ref = ls_t130m-trref
* KZRFB = ' '
IMPORTING
bildsequenz = lv_bilds
* KZ_BILDS_CHANGED =
EXCEPTIONS
wrong_call = 1
not_found = 2
OTHERS = 3.
CALL FUNCTION 'SELECTION_VIEWS_FIND'
EXPORTING
bildsequenz = lv_bilds
pflegestatus = mara-pstat
TABLES
bildtab = lt_views[]
EXCEPTIONS
call_wrong = 1
empty_selection = 2
OTHERS = 3.
ls_rmmg1-matnr = mara-matnr.
ls_rmmg1-werks = p_werks.
READ TABLE lt_views INTO lwa_view WITH KEY dytxt = p_dytxt.
CHECK sy-subrc EQ 0.
lwa_auswg-auswg = lwa_view-auswg.
APPEND lwa_auswg TO lt_auswg.
CALL FUNCTION 'MATERIAL_MAINTAIN_DIALOGUE'
EXPORTING
irmmg1 = ls_rmmg1
* IRMMG1_REF = ' '
KZ_EIN_DARK = 'X'
t_tcode = 'MM02'
* FLG_MATNR_RES = ' '
p_pstat = mara-pstat
* FLG_STAT_ALL = ' '
* CALL_MODE2 = ' '
* IMPORTING
* MATERIAL_NO =
* UPDATE_OK =
TABLES
iauswg = lt_auswg[]
EXCEPTIONS
no_authority = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Ferry Lianto -
How to call a Request Set from OAF
How we can call a Request set from OAF page .
Hi Sumit ,
Thanx for your responce.
I tried to call the below code in OAF AM method but i am getting error as : Invalid Column Type.
Please help me on this.
IS i am doing it in right way or not?
public void handleLaunchReconProg()
String sqlStatement = "BEGIN :1 := FND_SUBMIT.SET_REQUEST_SET (:2,:3); END;";
OADBTransaction txn = (OADBTransaction)getDBTransaction();
CallableStatement cStmt = txn.createCallableStatement(sqlStatement,1);
try
cStmt.registerOutParameter(1, Types.BOOLEAN);
cStmt.setString(2,"XXDIS");
cStmt.setString(3,"XXDIS_RECON_SUPP_BKLG");
cStmt.execute();
catch (Exception e)
throw OAException.wrapperException(e);
finally
try
cStmt.close();
catch (Exception e)
throw OAException.wrapperException(e);
} -
Call of BW queries from ABAP code
Has anybody information about how is it possible to call a BW query from ABAP code with parametrization (specifying characteristics) ? In our development project it's a crucial part, beacuse we have to provide interim function modules to carry out some conversion routine on BW provided data, before we put it on the screen embedded in a Visual composer Iview.
Have a look at this:
Calling BW queries programatically (also posted on BW forum)
Hope it helps.
Regards -
Call a Java Function From Abap
Hi, I need to call a java function from ABAP, I have a WAS 640 to deploy the module.
I have found this tutorial...
[ABAP calls Java via RFC|/people/thorsten.franz3/blog/2008/11/21/abap-calls-java-via-rfc-1-introduction]
The problem is that it uses a newer version of WAS and it implements EJB 3.0 wich only works on Java 5, but my WAS has java 1.4.2.
Anyone knows how to adapt this Blog to a WAS 640 version ?
Or Perhaps there is another way of doing this, maybe publishing my function as a web service.
Regards.
Mariano.Why don't you expose your Java functionality as a Web Service and consume it in ABAP program. That should be much easier and the web service can be used in other places as well.
Best regards,
Ritesh Chopra -
Calling an existing webservice from ABAP ?
I am trying to call an existing webservice from abap and cannot seem to get it right.
We are on 640.
What are the steps I need to follow ?
The address of the test wsdl is http://obcbox:50000/EMWSApp/DCCGen?wsdl
and http://obcbox:50000/wsnavigator/jsps/explorer.jsp?localWS=RU1XU0FwcC9zYXAuY29tJTJGRU1XU0FwcEVhci9FTVdTYXBwLmphcg%3D%3D
I need to be able to send data to the dccGenerator so it can do its work.
Any help would be greatly appreciated.
Cheers Steve.The following code will call the web service and fill the data into internal table which was received from the Web service. This code will send & Receive the data from ABAP to Webservice.
Change the Header detail as per your Webservice.
REPORT ZWORKORDER.
* Author : Raja T
* Company :******
TYPES: BEGIN OF OUTTAB1 ,
JOBCODE(20),
COMPONENTCODE(20),
ACCURATEHOURS(20),
ACCURATECOST(20),
LENGTH TYPE I,
END OF OUTTAB1 .
DATA: OUTTAB TYPE TABLE OF OUTTAB1.
DATA: TAB TYPE OUTTAB1.
DATA: WF_O LIKE LINE OF OUTTAB .
DATA: XSLT_ERR TYPE REF TO CX_XSLT_EXCEPTION .
DATA: RLENGTH TYPE I,
TXLEN TYPE STRING .
DATA: HTTP_CLIENT TYPE REF TO IF_HTTP_CLIENT .
DATA: WF_STRING TYPE STRING .
DATA: WF_STRING1 TYPE STRING .
DATA: WF_PROXY TYPE STRING ,
WF_PORT TYPE STRING .
CLEAR WF_STRING .
* Form the input string to send the Input Data to Web service.
CONCATENATE
'<?xml version="1.0" encoding="utf-8"?>'
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
' <soap:Body>'
' <GetWorkOrder xmlns="http://*******erica.net/webservices/">'
' <nWorkOrder>2</nWorkOrder>'
' <nDistributorCode>4871</nDistributorCode>'
' <model>HM400</model>'
' <type>1 </type>'
' </GetWorkOrder>'
' </soap:Body>'
'</soap:Envelope>'
INTO WF_STRING .
CLEAR :RLENGTH , TXLEN .
RLENGTH = STRLEN( WF_STRING ) .
MOVE: RLENGTH TO TXLEN .
CLEAR: WF_PROXY, WF_PORT .
CALL METHOD CL_HTTP_CLIENT=>CREATE
EXPORTING
HOST = '192.168.1.41' "'http://****merica.net/webservices'
SERVICE = '8080'
SCHEME = '1'
IMPORTING
CLIENT = HTTP_CLIENT.
HTTP_CLIENT->PROPERTYTYPE_LOGON_POPUP = HTTP_CLIENT->CO_DISABLED.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~request_method'
VALUE = 'POST'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~server_protocol'
VALUE = 'HTTP/1.1'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~request_uri'
VALUE = '/service/accurate/workorder.asmx?'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = 'Content-Type'
VALUE = 'text/xml; charset=utf-8'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = 'Content-Length'
VALUE = TXLEN.
CALL METHOD HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = 'SOAPAction'
VALUE = 'http://********merica.net/webservices/GetWorkOrder'.
CALL METHOD HTTP_CLIENT->REQUEST->SET_CDATA
EXPORTING
DATA = WF_STRING
OFFSET = 0
LENGTH = RLENGTH.
* Send the Input Data to Web service.
CALL METHOD HTTP_CLIENT->SEND
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2.
* Receive the Input from Web Serice.
CALL METHOD HTTP_CLIENT->RECEIVE
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3.
CLEAR WF_STRING1 .
WF_STRING1 = HTTP_CLIENT->RESPONSE->GET_CDATA( ).
DATA: LENGTH TYPE I.
LENGTH = STRLEN( WF_STRING1 ).
DATA: VALUE_FIELD TYPE NAME_KOMP.
DATA: VALUE TYPE REF TO DATA.
FIELD-SYMBOLS: <FS_CONVERTED_DATA>.
DATA: TAB1 TYPE TABLE OF STRING.
DATA: FROM_LENGTH TYPE I VALUE 1.
DATA: TO_LENGTH TYPE I.
DATA: DIFF TYPE I.
DATA: START TYPE I VALUE 1.
DO.
* JOBCODE.
SEARCH WF_STRING1 FOR 'JobCode=' . "STARTING AT START .
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
FROM_LENGTH = SY-FDPOS .
FROM_LENGTH = FROM_LENGTH + 8.
SEARCH WF_STRING1 FOR 'JobDescription=' ."STARTING AT START ..
TO_LENGTH = SY-FDPOS .
DIFF = TO_LENGTH - FROM_LENGTH .
MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-JOBCODE.
TO_LENGTH = DIFF + TO_LENGTH.
SHIFT WF_STRING1 BY TO_LENGTH PLACES.
* COMPONENT CODE
SEARCH WF_STRING1 FOR 'ComponentCode=' .
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
FROM_LENGTH = SY-FDPOS .
FROM_LENGTH = FROM_LENGTH + 14.
SEARCH WF_STRING1 FOR 'ComponentDescription=' .
TO_LENGTH = SY-FDPOS .
DIFF = TO_LENGTH - FROM_LENGTH .
MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-COMPONENTCODE.
TO_LENGTH = DIFF + TO_LENGTH.
SHIFT WF_STRING1 BY TO_LENGTH PLACES.
* AccurateHours
SEARCH WF_STRING1 FOR 'AccurateHours=' .
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
FROM_LENGTH = SY-FDPOS .
FROM_LENGTH = FROM_LENGTH + 14.
SEARCH WF_STRING1 FOR 'AccurateCost='.
TO_LENGTH = SY-FDPOS .
DIFF = TO_LENGTH - FROM_LENGTH .
MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-ACCURATEHOURS.
TO_LENGTH = DIFF + TO_LENGTH.
* AccurateCost
SEARCH WF_STRING1 FOR 'AccurateCost='.
FROM_LENGTH = SY-FDPOS.
FROM_LENGTH = FROM_LENGTH + 13.
SEARCH WF_STRING1 FOR '/>'.
TO_LENGTH = SY-FDPOS.
DIFF = TO_LENGTH - FROM_LENGTH .
MOVE WF_STRING1+FROM_LENGTH(DIFF) TO TAB-ACCURATECOST.
TO_LENGTH = DIFF + TO_LENGTH.
SHIFT WF_STRING1 BY TO_LENGTH PLACES.
APPEND TAB TO OUTTAB.
ENDDO.
WRITE: (10) 'JOBCODE'.
WRITE (20) 'COMPONENTCODE'.
WRITE (30) 'ACCURATEHOURS'.
WRITE (40) 'ACCURATECOST'.
LOOP AT OUTTAB INTO TAB.
WRITE:/ TAB-JOBCODE .
WRITE (20) TAB-COMPONENTCODE.
WRITE (30) TAB-ACCURATEHOURS.
WRITE (40) TAB-ACCURATECOST.
ENDLOOP .
Message was edited by:
Raja T -
SAP Script Check printing Layout, Line Items to display twice in First Page
Hi All,
This requirement is for US check printing Layout.
My Requirement is to display Items twice on the first page.
Eg : Main Window has 10 Items, I need to display all the Items at the bottom in another window at the bottom.
I can't create 2 Main windows in the first page, as the data from the Main window 1 overflows to Main window 2 in the first page.
I copied print program RFFOUS_C into a Z-version and try to implement the logic, however unable to print the line items in the bottom window.
Kindly give your valuable Inputs.
Thanks
VinayakHi
I had the same request for a check form in Canada. I solved it by writing the line item output into variables and print these variables in a second window. It was ~10 hours of effort, not a real nice technical solution but it worked.
If you require I can send you a PDF of the sap script form definition. You can contact me at [email protected] Answers can take 1 week or more.
Best regards
JD -
Calling a BSP page from ABAP programme
Dear Friends...
I am cslling a BSP... from an ABAP program... for that I have used this class and also a function module to ckeck.. actually from the abap program it invoks the BSP page very nicely and as my logic for invoking the BSP is a part of the Business Object and it is associated with the Enterprise portal so... when i reach the ep and trigger that business object to instantiate the BSP page from my calling logic of abap... it goes to the ITS and port 80 or something and didnt produce the BSP.. and only the blank screen was there...kindly help me how i am supposed to instantiate the BSP from properly from ABAP by interfacing the EP... my code is given below...
data :
lv_url type string.
concatenate
'http://sapdevbp.sbic.co.za:8041/sap(bD1lbiZjPTIwMA==)'
'/bc/bsp/sap/z_updatemng/bp.htm?bpid=' object-key-businesspartnerid
into lv_url.
call method cl_gui_frontend_services=>execute
exporting
document = lv_url
exceptions
others = 1.
please help....
me...
regards
NaimInstead of hard coding the URL try to get the URL of the BSP application with the below code
CALL METHOD cl_http_ext_webapp=>create_url_for_bsp_application
EXPORTING
bsp_application = '<BSP application name'
bsp_start_page = <start page e.g default.htm>
bsp_start_parameters = params " any parameter you want to pass along with url
IMPORTING
local_url = url.
Then try out passing the URL to the execute function -
Calling a java class from abap/bsp
Hello,
I am still learning ABAP. I need to call a java class (a chart drawing library) from ABAP or from a BSP. What is the best way to do that ?
Basically I would create an object, pass data from a database and then get some binary data from that object (an image).
Hope you can help me
Sincerely,
Olivier Matt/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
check the above link and this forum too
Call Java Class and Methods from ABAP -
Calling custom Infotype method from ABAP report
Hi Experts,
I am working on an application where i need to call a method of a custom defined infotype.
I have done this -->
1. Create a custom infotype 9111
2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
i want to call methods IF_HRPA_INFTY_BL~MODIFY,
IF_HRPA_INFTY_BL~INSERT
However when i call these method from abap report this method does not work.
where as when i try to insert an entry using PA30 transaction it works.
Does anyone know why does this happen and what is the solution?
Regards,
Ashish ShahHi,
This is the code we are using. Just calling the read and modify methods of the check class. Very simple actually .. we just want once update/insert to work but it does not.
<CODE>
REPORT ZTESTRAD_WD.
FIELD-SYMBOLS <p9106> TYPE p9106.
DATA : infty_container_tab TYPE hrpad_infty_container_tab ,
message_list TYPE REF TO cl_hrpa_message_list,
w_ok type boole_d ,
ref_class TYPE REF TO ZCL_HRPA_INFOTYPE_9106,
container TYPE REF TO if_hrpa_infty_container,
it9106_container TYPE REF TO cl_hrpa_infotype_container,
p9106_ref TYPE REF TO data,
busilog type ref to if_hrpa_masterdata_bl.
CREATE OBJECT message_list.
TRY.
CREATE OBJECT ref_class
EXPORTING
tclas = 'A'
infty = '9106'.
CATCH cx_hrpa_violated_assertion .
write :/ 'Error during initialization'.
ENDTRY.
call method cl_hrpa_masterdata_bl=>get_instance
importing
masterdata_bl = busilog.
TRY.
CALL METHOD ref_class->IF_HRPA_INFTY_BL~read
EXPORTING
tclas = 'A'
pernr = 'XXXXXXXX'
infty = '9106'
begda = sy-datum
endda = sy-datum
no_auth_check = abap_true
message_handler = message_list
IMPORTING
container_tab = infty_container_tab
is_ok = w_ok.
CATCH cx_hrpa_violated_assertion .
WRITE :/ 'Infotype could not be read'.
ENDTRY.
*" Fill the local structure with container data:
loop at infty_container_tab into container.
it9106_container ?= container.
TRY.
CALL METHOD it9106_container->primary_record_ref
IMPORTING
pnnnn_ref = p9106_ref.
CATCH cx_hrpa_violated_assertion .
ENDTRY.
ASSIGN p9106_ref->* to <p9106>.
write :/ <p9106> .
endloop.
*" Just change some field values of the record
<p9106>-C1name2 = 'Test name'.
<p9106>-C2name2 = 'Test name 2 3 4'.
data : return TYPE BAPIRETURN1,
return1 TYPE BAPIRETURN1.
*CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = <p9106>-pernr
IMPORTING
RETURN = return1
*PERFORM do_nothing(sapfp50p).
The container itself is modified
container ?= it9106_container->modify_primary_record( <p9106> ).
CREATE OBJECT message_list.
the invocation - errors are always fatal !!!
DATA : lx_exception TYPE REF TO cx_root,
update_mode type HRPAD_UPDATE_MODE,
massn type massn,
massg type massg.
TRY.
CALL METHOD ref_class->IF_HRPA_INFTY_BL~MODIFY(
EXPORTING
old_container = it9106_container
massn = massn
massg = massg
update_mode = update_mode
no_auth_check = 'X'
message_handler = message_list
IMPORTING
is_ok = w_ok
CHANGING
container = container
CATCH cx_hrpa_violated_assertion INTO lx_exception.
RAISE EXCEPTION TYPE cx_wd_no_handler
EXPORTING previous = lx_exception.
ENDTRY.
</CODE>
I have also tried by instantiating the cl_hrpa_masterdata_bl and then calling the methods on that object...... makes no difference.
I used this link to proceed with the modifications:
http://help.sap.com/saphelp_erp2005/helpdata/en/43/21d2254bba2bebe10000000a1553f7/frameset.htm
The funny thing is that the WHOLE logic executes without any error messages or dumps or anything. I have now debugged almost every line of code that these methods call. PA30 works just fine. HR_INFOTYPE_OPERATION does not .. that's a whole differnt story. -
CALL A JAVA PROGRAM FROM ABAP -- NEED HELP
Hi all,
Can somebody tell me how to call a java xml code from an ABAP program? First let me know if at all, is it possible to call a java program from SAP that is from an ABAP executable progam?
Please suggest me in this. All your inputs in this is valuable to me and highly appreciated.
Thanks in advance,
Vaishnavi VaradarajanHi,
Previous explanation i gave is not correct.
ABAP web services expose the function modules outside R/3, so that other technologies like Java can consume that webservice and read the data in R/3 using the function module.
For your requirement, create a Java web service to read the XML. Consume this webservice in ABAP. This way you can read the XML from ABAP.
Regards
Srikanth KV.
Maybe you are looking for
-
Directive Bundle - Shutdown workstation no longer works
Our network has been using a directive bundle to shutdown our pc's for over a year now and it had worked quite well up until a couple of weeks ago. At that point I added an additional requirement to keep it from shutting down a pc on our network, sin
-
IPhone will no longer sync; iSync behaving badly
My problem literally happened overnight. When I dock my iPhone it appears in iTunes, but I get a message saying it cannot sync information with my iMac "because syncing has been disabled on this computer. Do you want to enable syncing?" I click "yes"
-
Integration of oracle datawarehouse to enterprise portal
Hi, is it possible to connect/integrate an oracle datawarehouse to the enterprise portal? Has someone made this or has a reference of a client/company which made this integration? Thanks, Best regards, Christine
-
Hello I hope someone can guide me in the right direction. I am producing a cd in Flash. I want my flash files to play inside of a container/frame. The container will be viewed as a red bar at the top and bottom of the flash, containing my play, pause
-
Firefox for Android User Agent WRONG
I am using Firefox on my Galaxy S4 which has a screen size of 1080 x 1920 and Firefox is reporting that it is a Tablet. I am running a custom DPI of 320. The issue is that T-Mobile thinks I am tethering when i am not. Please, I beg you, make an optio