HR ABAP PROGRAMMING - END OF INFOGROUP
Hi All,
I have to execute a form/function or report and the end of an infogroup...
I create infotype 0000 and execute the infogrup at the end of this I'd like execute something when the infogroup is over,even if some infotype are not created!
-> Dynamic action is not good i think, maybe user exit or something!
Regards,
Stephan
Hi Stephan,
What is the issue with Dynamic Actions? Anyway, You know the last infotype in the infogroup.. lets say it is 0019. In the User exit ZXPADU02 you can try the following..
case innnn-infty.
when '0019'
if sy-tcode eq 'PA40'.
* do something
endif.
endcase.
You can also uss similar approach in the BAdI HRPAD00INFTY.
Regards,
Suresh Datti
Similar Messages
-
Abap program - end of process chain
Hi,
I have a requirement. At the end of each process chain, the ABAP program must trigger email.
The process chains are having naming format of Z<Module name>. Ex: SD process chain will have ZSD, PS process chain will have ZPS etc.
Now we are reading a table based on the module and identify the users, and to those users email should be sent.
Now i am unable to identify the name of the process chain at run time from my ABAP program.
Is there any way to identify the name of the process chain at runtime from ABAP program?
Thanks.Hi,
Your question is not clear can you please provide few more detail.
for sending mail to users you can use "Varient" whatever you required. I am not sure what table you are using.
Regards,
satya. -
Ending a process chain with abap program
Hello friends.
Can anyone help me please?
I have a problem with a process chain in BW.
The process chain is triggered by the MF BP_EVENT_RAISE in an custom MF. While the process chain works, the custom MF is monitoring the chain´s log.
This process chain have 2 steps: one is the initial process and the other is a ABAP program. In the abap program there are validations and if exists some error, the program abort and this job (BI_PROCESS_ABAP) is cancelled. The problem is that i have to go to the Tx. RSPC and view the logs fro this chain and in these moment ends th custom MF. In other wors, the MF ciustom ends until i go to the tx RSPC for view the logs.
I need that the program ends the process chain naturally.
Thanks for your help.
Regards.Hi,
You can end a process chain by seeing the variant name and instance name of teh process chain from and finding its corresponding log id,type of process from the table RSPCPROCESSLOG and then executing the standard FM RSPC_PROCESS_FINISH. Here you will have to give the log id,type of process ,vairant name and instance name alongwith the status of the process chain as R to end the process chains.
If you want to aurtomate it you can do that by creating a Z program which will read LOG ID and teh TYPE of process from table RSPCPROCESSLOG on the basis of variant name and the instance name of the process chain and the execute the function module RSPC_PROCESS_FINISH from inside the program.
Navesh -
Schedule Jobs with multiple steps via ABAP Program
Hi,
I need to schedule multiple programs via background jobs on a daily basis. Since all these jobs are to be run as a single job, the various programs have to be run as steps in a major job.
I am however not very clear on how this can be done via an ABAP program ( the idea of a program is that various parameters to be passed to each program in the step can be entered dynamically rather than via variants).
I am using the JOB_OPEN and JOB_CLOSE functions and submitting the programs with selection screen parameters dynamically passed to create a job. I need to do this for various programs as a job step (WITHOUT Variants being defined).
Can anyone suggest any ideas for this? I have tried out JOB_SUBMIT Function but am not very confident I know what exactly it is for as it asks for a variant.
Thanks very much,
PreetHi Preet,
just to be sure: you know, that variants can be dynamical, too?
It's quite usual to assign dynamical current date, but it's also possible to add / subtract value and even define own functionality.
Maybe it's easier to implement a dynamical selection and handle static jobs.
If you try to plan a job (online or with JOB_SUBMIT), you have to use variants - you can create (or change) them dynamical in beforehand. Only SE38, F8, F9 is creating a temporary variant, so that no saved variant is necessary.
But if you end up creating variants dynamical, you can change one existing variant, too. Then you can use a static job definition (with periodical starting rule).
So: have a look, if dynamic variants are enough, otherwise change variants per job.
Regards,
Christian -
Error in executing ABAP program. Error occurred when creating dataset
hi,
when I use LKM SAP ERP to Oracle (SQLLDR) to extract data from SAP ERP server. I execute my interface, and it's stop at extract data step.
This is message:
java.lang.RuntimeException: Error occured in open tool execute method...Error in executing ABAP program...Error in executing ABAP program...Error occurred when creating dataset/abc/ZODI_13001_6001_GLOBAL.txt
I tried others path name, tried slash or backslash. This is content in code tab
OdiSAPAbapExecute "-UPLOAD=1" "-EXECUTE=1" "-EXECUTEBASE_RKM=0" "-ZRFC_RUN_INSTALL=1" "-ABAP_PROGRAM_NAME=ZODI_13001_6001" "-HOST=10.86.87.24" "-USER=sv_hoa" "-PASSWORD=<@=snpRef.getInfo("SRC_PASS") @>" "-SAP_CLIENT=800" "-SAP_LANGUAGE=EN" "-SAP_SYSTEM_NUMBER=02" "-SAP_FUNCTION_GROUP_NAME=ZODI_FGR_13001" "-CONNECTION_POOL_NAME=SAP_ODI_ERP_POOL_10.86.87.24" "-CONNECTION_POOL_SIZE=10" "-FILE_DELIMITER=<@=""+(char)8@>" "-FILE_NAME=ZODI_13001_6001_GLOBAL.txt" "-FTP_HOST=10.86.82.108" "-FTP_USER=anh" "-FTP_PASSWORD=<@=sFtpPassword@>" "-FTP_PASSIVE_MODE=1" "-FTP_TRANSFER_TIMEOUT=100000" "-ODI_VARIABLE_NAMES=" "-ODI_VARIABLE_VALUES=" "-USER_ABAP_PARAMETER_NAMES=IV_DELIMITER,CHAR3;IV_FILENAME,CHAR255;IV_USER,CHAR35;IV_PWD,CHAR35;IV_HOST,CHAR35;IV_HASHVALUE,CHAR35;IV_PATH,CHAR35;IV_MAX_ROW_CNT,SYTABIX;IV_FETCH_BATCH_SIZE,SYTABIX;" "-USER_ABAP_PARAMETER_VALUES=<Value>" "-USER_ABAP_PARAMETER_SEPARATOR=<Value>" "-ABAP_TABLE_PARAMETERS=RETURN,BAPIRETURN;ET_FILE_RETURN,BAPIRET2" "-ABAP_EXPORT_PARAMETERS=ERRORMESSAGE;SY-MSGV1" "-LOG_FILE_NAME=C:\Users\anh\AppData\Local\Temp\SapAbapExecuteOpenTool_13001.log" "-FTP_PATH=/abc/" "-DEV_CLASS=ZODI_DEVCLASS" "-MAX_ROW_COUNT=" "-FETCH_BATCH_SIZE=100000" "-HASH_VALUE_MARKER=HVM" "-ABAP_PROGRAM_BODY=
*Final Type declarations
TYPES : BEGIN OF ty_final,
Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_final.
*Final Temp Type Declarations
TYPES : BEGIN OF ty_final_tmp,
Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID ,
Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH ,
Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH ,
Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH ,
Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI ,
Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU ,
END OF ty_final_tmp.
*Final Target Type Declarations
TYPES : BEGIN OF ty_final_target,
C0_Y03HOCSINH_HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
C5_Y03HOCSINH_GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_final_target.
* Table type for Y03HOCSINH
TYPES : BEGIN OF ty_Y03HOCSINH,
HOCSINH_ID TYPE
Y03HOCSINH-HOCSINH_ID,
MA_HOC_SINH TYPE
Y03HOCSINH-MA_HOC_SINH,
TEN_HOC_SINH TYPE
Y03HOCSINH-TEN_HOC_SINH,
GIOI_TINH TYPE
Y03HOCSINH-GIOI_TINH,
DIA_CHI TYPE
Y03HOCSINH-DIA_CHI,
GHI_CHU TYPE
Y03HOCSINH-GHI_CHU,
END OF ty_Y03HOCSINH.
TYPES: BEGIN OF gs_text,
line(843) TYPE c,
END OF gs_text.
*Structure Declarations
DATA: wa_final_string TYPE string,
wa_final TYPE ty_final,
wa_final_target TYPE ty_final_target,
wa_Y03HOCSINH TYPE ty_Y03HOCSINH,
*Table Declarations
tt_final TYPE STANDARD TABLE OF ty_final,
tt_Y03HOCSINH TYPE STANDARD TABLE OF ty_Y03HOCSINH,
tt_final_target TYPE STANDARD TABLE
OF ty_final_target,
tt_final_tmp TYPE STANDARD TABLE OF ty_final_tmp,
tt_final_tmp1 TYPE STANDARD TABLE OF ty_final,
gt_result TYPE STANDARD TABLE OF gs_text,
*Variable Declarations
lv_path TYPE string,
lv_flag TYPE char1,
C0_Y03HOCSINH_HOCSINH_ID TYPE
STRING,
C1_Y03HOCSINH_MA_HOC_SINH TYPE
STRING,
C2_Y03HOCSINH_TEN_HOC_SINH TYPE
STRING,
C3_Y03HOCSINH_GIOI_TINH TYPE
STRING,
C4_Y03HOCSINH_DIA_CHI TYPE
STRING,
C5_Y03HOCSINH_GHI_CHU TYPE
STRING,
wa_final_tmp TYPE ty_final_tmp,
lv_file TYPE string,
lv_datum TYPE sy-datum,
lv_date TYPE char10,
wa_result TYPE string,
lv_delimiter type string,
lv_cnt TYPE sytabix,
*-Cursor Declaration
lv_Y03HOCSINH_dbcur TYPE cursor,
lv_tabix_frm TYPE sy-tabix.
lv_delimiter = iv_delimiter.
IF iv_hashvalue = 'HVM'.
*Open/delete output file
CONCATENATE iv_path iv_filename INTO lv_path.
*Check for file existence, if found, delete it
OPEN DATASET lv_path FOR INPUT
IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
DELETE DATASET lv_path.
ENDIF.
*Open/create output file
OPEN DATASET lv_path FOR APPENDING
IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
*Batch Processing
OPEN CURSOR WITH HOLD lv_Y03HOCSINH_dbcur FOR
SELECT HOCSINH_ID
MA_HOC_SINH
TEN_HOC_SINH
GIOI_TINH
DIA_CHI
GHI_CHU
FROM Y03HOCSINH.
DO.
*Check for the counter, only for first batch
*process new line is required...
lv_cnt = lv_cnt + 1.
REFRESH tt_Y03HOCSINH.
FETCH NEXT CURSOR lv_Y03HOCSINH_dbcur
APPENDING TABLE tt_Y03HOCSINH
PACKAGE SIZE IV_FETCH_BATCH_SIZE.
IF NOT tt_Y03HOCSINH IS INITIAL.
ELSE.
EXIT.
ENDIF.
LOOP AT tt_Y03HOCSINH INTO wa_Y03HOCSINH.
MOVE wa_Y03HOCSINH-HOCSINH_ID
TO wa_final_tmp-Y03HOCSINH_HOCSINH_ID.
MOVE wa_Y03HOCSINH-MA_HOC_SINH
TO wa_final_tmp-Y03HOCSINH_MA_HOC_SINH.
MOVE wa_Y03HOCSINH-TEN_HOC_SINH
TO wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_Y03HOCSINH-GIOI_TINH
TO wa_final_tmp-Y03HOCSINH_GIOI_TINH.
MOVE wa_Y03HOCSINH-DIA_CHI
TO wa_final_tmp-Y03HOCSINH_DIA_CHI.
MOVE wa_Y03HOCSINH-GHI_CHU
TO wa_final_tmp-Y03HOCSINH_GHI_CHU.
APPEND wa_final_tmp TO tt_final_tmp.
ENDLOOP.
free : tt_Y03HOCSINH.
LOOP AT tt_final_tmp INTO wa_final_tmp.
MOVE wa_final_tmp-Y03HOCSINH_HOCSINH_ID
TO wa_final_target-C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_tmp-Y03HOCSINH_MA_HOC_SINH
TO wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH
TO wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_tmp-Y03HOCSINH_GIOI_TINH
TO wa_final_target-C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_tmp-Y03HOCSINH_DIA_CHI
TO wa_final_target-C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_tmp-Y03HOCSINH_GHI_CHU
TO wa_final_target-C5_Y03HOCSINH_GHI_CHU.
Append wa_final_target to tt_final_target.
ENDLOOP.
free : tt_final_tmp.
Clear wa_final_target.
IF NOT iv_max_row_cnt IS INITIAL.
Loop at tt_final_target into
wa_final_target TO iv_max_row_cnt.
MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
TO C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
TO C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
TO C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
TO C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
TO C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
TO C5_Y03HOCSINH_GHI_CHU.
CONCATENATE
C0_Y03HOCSINH_HOCSINH_ID
C1_Y03HOCSINH_MA_HOC_SINH
C2_Y03HOCSINH_TEN_HOC_SINH
C3_Y03HOCSINH_GIOI_TINH
C4_Y03HOCSINH_DIA_CHI
C5_Y03HOCSINH_GHI_CHU
INTO wa_final_string
SEPARATED BY lv_delimiter.
IF sy-tabix EQ 1 AND lv_cnt EQ 1.
CONCATENATE wa_final_string
lv_delimiter INTO wa_final_string.
ELSE.
CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
lv_delimiter INTO wa_final_string.
ENDIF.
APPEND wa_final_string TO gt_result.
CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI,
C5_Y03HOCSINH_GHI_CHU.
ENDLOOP.
ELSE.
Loop at tt_final_target into wa_final_target.
MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
TO C0_Y03HOCSINH_HOCSINH_ID.
MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
TO C1_Y03HOCSINH_MA_HOC_SINH.
MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
TO C2_Y03HOCSINH_TEN_HOC_SINH.
MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
TO C3_Y03HOCSINH_GIOI_TINH.
MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
TO C4_Y03HOCSINH_DIA_CHI.
MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
TO C5_Y03HOCSINH_GHI_CHU.
CONCATENATE
C0_Y03HOCSINH_HOCSINH_ID
C1_Y03HOCSINH_MA_HOC_SINH
C2_Y03HOCSINH_TEN_HOC_SINH
C3_Y03HOCSINH_GIOI_TINH
C4_Y03HOCSINH_DIA_CHI
C5_Y03HOCSINH_GHI_CHU
INTO wa_final_string
SEPARATED BY lv_delimiter.
IF sy-tabix EQ 1 AND lv_cnt EQ 1.
CONCATENATE wa_final_string
lv_delimiter INTO wa_final_string.
ELSE.
CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
lv_delimiter INTO wa_final_string.
ENDIF.
APPEND wa_final_string TO gt_result.
CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
C1_Y03HOCSINH_MA_HOC_SINH,
C2_Y03HOCSINH_TEN_HOC_SINH,
C3_Y03HOCSINH_GIOI_TINH,
C4_Y03HOCSINH_DIA_CHI,
C5_Y03HOCSINH_GHI_CHU.
ENDLOOP.
ENDIF.
free : tt_final_target.
IF NOT gt_result IS INITIAL.
CLEAR wa_result.
LOOP AT gt_result INTO wa_result.
TRANSFER wa_result TO lv_path.
ENDLOOP.
ENDIF.
REFRESH gt_result.
*End of main loop for batching
ENDDO.
*Close dataset
CLOSE DATASET lv_path.
CLOSE CURSOR lv_Y03HOCSINH_dbcur.
ELSE.
DATA: lv_mesg TYPE string.
CLEAR et_file_return.
et_file_return-type = 'E'.
CONCATENATE
'Error occurred when creating dataset' lv_path
INTO lv_mesg.
et_file_return-message = lv_mesg.
Append et_file_return.
ENDIF.
ELSE.
CLEAR et_file_return.
et_file_return-type = 'E'.
et_file_return-message =
'Installed ABAP program does not match interface definition'.
APPEND et_file_return.
ENDIF.
Thanks for helpr u able to figure it out..........i got the same error .......can someone help me fix this issue
-
Error when Consuming a WS from an ABAP program
Hello,
I am getting an error when I try to consume a WS from my ABAP program. The error states ' Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/' and the code is SOAP: 14
This should be a simple call to a WS from BOBJ. I have searched OSS and SDN and I can't find any help. We are using 7.01 SP3
Actually I watched the blog by Thomas Jung to get me started and thing went well except forthe part where I was supposed to create the logical port via SOAMANAGER. I got this error 'Error: Initial value "context operation table" in methodDELETE_INVALID_INTERFACE_NODES of class CL_SRT_WSP_CONFIG_SIDL' so I used LPCONFIG instead and them SM59.
Has anyone encountered something like this?
Thanks!
RichOk so I got the bright idea of putting an external breakpoint in the DELETE_INVALID_INTERFACE_NODES method of class CL_SRT_WSP_CONFIG_SIDL and interestingly I think I am on to something. The code that is throwing an expection is srt_wsp_error_is_initial lt_operations[] 'context operation table'. "#EC NOTEXT at approximentally line 89.
So I am doing my amateur sleuthing in the debugger and it leads me to the WSDL and what looks like a missing operation for a port type. I say this b/c all the port type /port type tags have operation/operation tags embedded within them. simliar to this
<portType name="Real-time_Services" />
- <portType name="Batch_Jobs">
- <operation name="Oracle">
<input message="tns:Oracle_Input" />
<output message="tns:Oracle_Output" />
</operation>
</portType>
- <portType name="Realtime_Service_Admin">
- <operation name="Get_RTService_List">
<input message="tns:Get_RTService_List_Input" />
<output message="tns:Get_RTService_List_Output" />
</operation>
- <operation name="Run_Realtime_Service">
<input message="tns:Run_Realtime_Service_Input" />
<output message="tns:Run_Realtime_Service_Output" />
</operation>
- <operation name="Get_RTMsg_Format">
<input message="tns:Get_RTMsg_Format_Input" />
<output message="tns:Get_RTMsg_Format_Output" />
</operation>
</portType>
Note the first port type = Real-time_services doesn't have an end port tag and in the debugger my ABAP is shortdumping when trying to proess this port type
I think I found my error. Can anyone who has seen this before verify this for me before I give the WSDL creator heck
Thanks
Rich -
Reading the XML message from Xi stored in XML format from a abap program.
Hi Gurus,
My requirement here is to read the data that will be coming from Xi from my custom abap program and updating 2 data base tables. The method is after the data mapping is done a class is generated in abap proxy in which a method is available. Inside the method i am writing the code for getting the Xi data stored as a payload message which can be seen in the transaction SXMB_MONI. My code is given below.
***begin code***
method ZII_PAYROLL_HEADER_IN~PAYROLL_HEADER_IN.
**** INSERT IMPLEMENTATION HERE **** ***
data: ln type i.
DATA: i_items TYPE TABLE OF ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
*DATA: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_TAB5.
data: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
DATA:PERNR TYPE STRING.
*data: it_ZPAYLOAD_WRAPPER16 TYPE ZPAYLOAD_WRAPPER16.
I_ITEMS[] = INPUT-PAYLOAD_WRAPPER-BODY-XMLDOC-PAYROLL_PERIOD_OVERVIEW-EMPLOYEE_RECORD[].
*I_ITEMS = INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
describe table i_items[] lines ln.
endmethod.
**End code***
As per the logic the data stored in the XML message should be avaialble in INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord which i am assigning to a local internal table in the class.
But in my case there is no data coming in
INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
But i can see the data transffered from XI in the transaction SXMB_MONI->XML message->inbound message->payload.
Is there any way to read the data stored in the XML message in the transaction SXMB_MONI.
Also why the data is not coming in
INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord inside the class.
If there is any solution for this problem please post it.You can use function module SXMB_GET_MESSAGE_PAYLOAD.
Code snippet:
DATA: ls_mast TYPE sxmspmast,
ls_msgkey TYPE sxmsmkey,
lv_bin_xml TYPE xstring,
lv_str_xml TYPE string.
* select sxmspmast into ls_mast
ls_msgkey-msgid = ls_mast-msgguid.
ls_msgkey-pid = 'RECEIVER'.
CALL FUNCTION 'SXMB_GET_MESSAGE_PAYLOAD'
EXPORTING
im_msgkey = ls_msgkey
im_archive = ' '
im_version = ls_mast-vers
IMPORTING
ex_msg_bytes = lv_bin_xml
EXCEPTIONS
not_authorized = 1
no_message = 2
internal_error = 3
no_payload = 4
OTHERS = 5.
IF sy-subrc EQ 0.
lv_str_xml = cl_soap_moni_helper=>convert_xstring_to_string( xstring_in = lv_bin_xml ).
ENDIF. -
Reading XML Data from ABAP Program?
Hi,
How do I read XML Data from an ABAP Program? For example if I have the below basic XML Code-
<xml>
<Name> Thiru </Name>
<Age> 24 </Age>
<City> chennai </Chennai>
</xml>
How do i read the data within the Name,Age, and City tags into variables in the ABAP Program?
Regards,
Thiruif you decide to do in XSLT, I have a sample list here:
XML file like this:
<?xml version="1.0" encoding="UTF-16"?>
<F>
<P1>
<t_1>value1</t_1>
<t_2>testvalue</t_2>
</P1>
<P2>
</P2>
</F>
XSLT file like this:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="F">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<<b>DOCUMENT</b>>
<xsl:apply-templates/>
</<b>DOCUMENT</b>>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="P1">
<ENTRY>
<<b>T_1</b>><xsl:value-of select="t_1"/></T_1>
<<b>T_2</b>><xsl:value-of select="t_2"/></T_2>
</ENTRY>
</xsl:template>
</xsl:transform>
ABAP program like this:
DATA: BEGIN OF wa_upload,
text(255) TYPE c,
END OF wa_upload,
itab_upload LIKE TABLE OF wa_upload,
BEGIN OF wa_document,
t_1 TYPE string,
t_2 TYPE string,
END OF wa_document,
itab_document LIKE TABLE OF wa_document.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'XXXXX'
filetype = 'ASC'
TABLES
data_tab = itab_upload.
CALL TRANSFORMATION zrappel_xml_test
SOURCE XML itab_upload
RESULT <b>document</b> = itab_document.
You should pay attention to the bold words.
hope it will be helpful
thanks -
Hi everyone!
Is there a way in ABAP to output XML files? Pls. send code/ function module if any.
From ABAP programs, we are sure that we can output TEXT files, but how about XML files?
The significance of this question is related
Currently we are using XI to interface SAP and AMS, this question for ABAP to produce XML file arose, if for example, the XI server is down and we have to still send data from one system to another. IDocs can also produce XML files, pls confirm. Earlier however, we have preferred XI rather than IDocs to do this. Anyway, any idea regarding this scenario will be greatly appreciated.
Thanks and God bless!
CelesteHi,
Please check this sample codes from other thread.
1. itab --- > xml
xml ---> itab.
2. This program will do both.
(just copy paste in new program)
3.
REPORT abc.
*-------------- DATA
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
DATA : BEGIN OF itab OCCURS 0,
a(100) TYPE c,
END OF itab.
DATA: xml_out TYPE string .
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
DATA: xmlupl TYPE string .
******************************* FIRST PHASE
******************************* FIRST PHASE
******************************* FIRST PHASE
*------------------ Fetch Data
SELECT * FROM t001 INTO TABLE t001.
*------------------- XML
CALL TRANSFORMATION ('ID')
SOURCE tab = t001[]
RESULT XML xml_out.
CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
EXPORTING
TEXT = xml_out
* IMPORTING
* LENGTH =
TABLES
FTEXT_TAB = itab.
*-------------- Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'BIN'
filename = 'd:xx.xml'
TABLES
data_tab = itab.
******************************* SECOND PHASE
******************************* SECOND PHASE
******************************* SECOND PHASE
BREAK-POINT.
REFRESH t001.
CLEAR t001.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'D:XX.XML'
filetype = 'BIN'
TABLES
data_tab = upl.
LOOP AT upl.
CONCATENATE xmlupl upl-f INTO xmlupl.
ENDLOOP.
*------------------- XML
CALL TRANSFORMATION ('ID')
SOURCE XML xmlupl
RESULT tab = t001[]
BREAK-POINT.
Regards,
Ferry Lianto -
How to finish ABAP program in the process chains
Hello All,
we have one ABAP program in the process chains which was created in the BW system only.
this program we are using in the synchronous mode. according to my understanding we can not capture the failure of the ABAP program when it is in the synchronous mode.
but i found a way through one this forum topic to capture the failure of the program through asynchrous mode by calling a function module RSPC_ABAP_FINISH but it was with the R/3 program in BW.
can we use the same function module for BW program also.
kindly let me know what steps we need to follow for the BW program in the process chains to capture the failure status.
Regards,
Ala.Hi Ala,
we created an own processtype, look at this HowTo: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/45d8a990-0201-0010-a290-f22083728179
and than also an abap which can end red or green:
PARAMETERS: red RADIOBUTTON GROUP radi,
green RADIOBUTTON GROUP radi.
IF NOT green IS INITIAL.
MESSAGE i162(00) WITH 'Status' 'Green'.
ELSE.
MESSAGE e162(00) WITH 'Status' 'Red'.
ENDIF.
with i-message process ends green, with e-message process ends red.
/manfred -
Issue with the ABAP program to find BI lookups and code Patterns
Hello dears,
I'm trying to use the ABAP program LOOKUP_FINDER:
http://wiki.sdn.sap.com/wiki/display/BI/ABAPprogramtofindBIlookupsandcodePatterns
But I have the following issue:
Runtime Errors
RAISE_EXCEPTION
Short text
Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.
Error analysis
A RAISE statement in the program "CL_GUI_ALV_GRID===============CP" raised the
exception
condition "NO_FIELDCATALOG_AVAILABLE".
Since the exception was not intercepted by a superior
program, processing was terminated.
Source Code Extract
Line SourceCde
1 method set_sort_criteria.
2
3 *... (1) Trace?
4 if not mr_trace is initial.
5 call method mr_trace->add_trace_item
6 exporting
7 i_trace_item = 'SET_SORT_CRITERIA'
8 ir_variant = m_cl_variant
9 it_data = mt_data
10 it_info = mt_info.
11 endif.
12
13 if m_cl_variant->mt_fieldcatalog is initial.
>>>>> raise no_fieldcatalog_available.
15 endif.
16
17 m_cl_variant->mt_sort = it_sort.
18
19 call function 'LVC_SORT_COMPLETE'
20 exporting
21 it_fieldcat = m_cl_variant->mt_fieldcatalog
22 changing
23 ct_sort = m_cl_variant->mt_sort.
24
25 endmethod.
This issue is located in the FM 'REUSE_ALV_GRID_DISPLAY' called at the end of the program.... maybe because the catalog is empty?
For your information, I called the program 'ZLOOKUP_FINDER'.
Can you help me to fix this issue?
Regards,
Vince.Hi Vince,
If a table is empty field catalog usually return no error it just display your field catalog with headers .
I think the issue is with building of field catalog .
May be some settings are missing there .
Please check FM REUSE_ALV_FIELDCATALOG_MERGE where field catalog is getting generated.
Regards,
Jaya Tiwari -
BEx Login error - Termination occurred in the ABAP program "CL_GUI_FRONTEND
Dear All,
I am having error when i am trying to login in BEx Analyser / Quary Designer 7.0
i am using the same user ID password as when i used to login to SAP BW through Logon pad.
but still i am having the error "Name or Password is incorrect. (repeat logon)"
I did try RRMX in BW, i got
Runtime Errors RAISE_EXCEPTION
Information on where terminated
Termination occurred in the ABAP program "CL_GUI_FRONTEND_SERVICES======CP" -
in "GUI_DOWNLOAD".
The main program was "RRMX_START_EXCEL ".
In the source code you have the termination point in line 89
of the (Include) program "CL_GUI_FRONTEND_SERVICES======CM012".
the program in the error dump as
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = BIN_FILESIZE
FILENAME = FILENAME
FILETYPE = FILETYPE
APPEND = APPEND
WRITE_FIELD_SEPARATOR = WRITE_FIELD_SEPARATOR
HEADER = HEADER
TRUNC_TRAILING_BLANKS = TRUNC_TRAILING_BLANKS
WRITE_LF = WRITE_LF
COL_SELECT = COL_SELECT
COL_SELECT_MASK = COL_SELECT_MASK
DAT_MODE = DAT_MODE
CONFIRM_OVERWRITE = CONFIRM_OVERWRITE
NO_AUTH_CHECK = NO_AUTH_CHECK
CODEPAGE = CODEPAGE
IGNORE_CERR = IGNORE_CERR
REPLACEMENT = REPLACEMENT
WRITE_BOM = WRITE_BOM
TRUNC_TRAILING_BLANKS_EOL = TRUNC_TRAILING_BLANKS_EOL
WK1_N_FORMAT = WK1_N_FORMAT
WK1_N_SIZE = WK1_N_SIZE
WK1_T_FORMAT = WK1_T_FORMAT
WK1_T_SIZE = WK1_T_SIZE
SHOW_TRANSFER_STATUS = SHOW_TRANSFER_STATUS
IMPORTING
FILELENGTH = FILELENGTH
TABLES
DATA_TAB = DATA_TAB
FIELDNAMES = FIELDNAMES
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
case sy-subrc.
when 1.
RAISE FILE_WRITE_ERROR.
when 2.
RAISE NO_BATCH.
when 3.
RAISE GUI_REFUSE_FILETRANSFER.
when 4.
RAISE INVALID_TYPE .
when 5.
RAISE NO_AUTHORITY.
when 6.
RAISE UNKNOWN_ERROR.
when 7.
RAISE HEADER_NOT_ALLOWED.
when 8.
RAISE SEPARATOR_NOT_ALLOWED.
when 9.
RAISE FILESIZE_NOT_ALLOWED.
when 10.
RAISE HEADER_TOO_LONG.
when 11.
RAISE DP_ERROR_CREATE.
when 12.
RAISE DP_ERROR_SEND.
when 13.
RAISE DP_ERROR_WRITE.
when 14.
RAISE UNKNOWN_DP_ERROR.
>>>>when 15.
RAISE ACCESS_DENIED.
krishHello,
the same type of problem was solved today this way (it´s due to a local client problem):
Start users local SAP GUI
In the left upper corner of SAP GUI select the menue and -> options.
Delete all cache files of SAP GUI and browse the local SAP GUI download folder of the users workstation. Rename the files in the download/workdir folder for example to *_old.
Logon to SAP system again, run RRMX again -> confirm download of bex config file -> Excel sheet should open now.
Important: also the end user has to configure some excel addin options (bex) otherwise the excel sheet will be blank / empty.
BR,
Alessandro -
How do we call smartforms in abap program or web services
how do we call smartforms in abap program or web services
How many types of smartforms are there?
points will be rewardedHi
See this sample program
Using the fun module smartform is called from the program
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
<b>call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'</b>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function <b>FM_NAME</b>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
<b>Reward points for useful Answers</b>
Regards
Anji -
Code to call url in abap program
code to call url in abap program using cl_http requests and save the outcome to a location in a file
See the below program
REPORT zbrowser .
TABLES : sscrfields.
INCLUDE .
CONSTANTS: htmlcntl_eventid_on_navigate TYPE i VALUE 1.
CONSTANTS: htmlcntl_eventid_navigate_com TYPE i VALUE 2.
DATA : h_html_ctrl TYPE cntl_handle,
repid TYPE sy-repid,
dynnr TYPE sy-dynnr,
cmd TYPE sy-ucomm,
flag,disp.
DATA : it_exclude LIKE TABLE OF rsexfcode WITH HEADER LINE.
SELECTION-SCREEN : FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3,
FUNCTION KEY 4,
FUNCTION KEY 5.
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 2
SELECTION-SCREEN COMMENT 45(50) comment1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(28) comment2 FOR FIELD url.
SELECTION-SCREEN POSITION 31.
PARAMETERS : url(1064) LOWER CASE .
SELECTION-SCREEN PUSHBUTTON 79(4) open USER-COMMAND open.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
comment1 = 'ABAP INTERNET EXPLORER'.
comment2 = 'Enter URL/Filename To Open :'.
open = icon_transfer .
sscrfields-functxt_05 = icon_sap.
sscrfields-functxt_04 = icon_booking_stop.
sscrfields-functxt_03 = icon_refresh.
sscrfields-functxt_02 = icon_arrow_right.
sscrfields-functxt_01 = icon_arrow_left.
repid = sy-repid.
dynnr = '1000'.
it_exclude-fcode = 'ONLI'.
APPEND it_exclude.
it_exclude-fcode = 'INFO'.
APPEND it_exclude.
*Changing GUI status
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
p_program = repid
TABLES
p_exclude = it_exclude.
CALL FUNCTION 'CONTROL_INIT' .
IF sy-subrc <> 0.
EXIT.
ENDIF.
CALL FUNCTION 'HTMLCNTL_CREATE'
EXPORTING
owner_repid = repid
link_repid = repid
dynnr = dynnr
handle = h_html_ctrl
EXCEPTIONS
control_install_error = 1
create_error = 2
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 3
OTHERS = 3
IF sy-subrc <> 0.
EXIT.
ENDIF.
CALL FUNCTION 'HTMLCNTL_INIT'
EXPORTING
h_control = h_html_ctrl
left = 1
top = 2
width = 143
height = 37
register_event_on_navigate = 'X'
cb_form_navigate_complete = 'ON_CONTROL_EVENT'
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2
dp_create_error = 3
dp_install_error = 4
dp_error = 5
create_browser_error = 6
init_error = 7
OTHERS = 8
IF sy-subrc <> 0.
EXIT.
ENDIF.
CALL FUNCTION 'CONTROL_FLUSH'.
AT SELECTION-SCREEN.
cmd = sscrfields-ucomm.
CASE cmd.
WHEN 'OPEN'.
PERFORM load_html_page.
CALL FUNCTION 'CONTROL_FLUSH'.
WHEN 'FC01'. "BACK
CALL FUNCTION 'HTMLCNTL_GO_BACK'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 4
PERFORM get_current_url.
WHEN 'FC02'. "FORWARD
CALL FUNCTION 'HTMLCNTL_GO_FORWARD'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
PERFORM get_current_url.
WHEN 'FC03'. "REFRESH
CALL FUNCTION 'HTMLCNTL_DO_REFRESH'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
PERFORM get_current_url.
WHEN 'FC04'. "STOP
CALL FUNCTION 'HTMLCNTL_STOP'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
WHEN 'FC05'. "GO TO HOME
CALL FUNCTION 'HTMLCNTL_GO_HOME'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
PERFORM get_current_url.
CALL FUNCTION 'CONTROL_FLUSH'.
WHEN OTHERS.
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 5
CALL FUNCTION 'CONTROL_DISPATCH'
EXPORTING
fcode = cmd.
CALL FUNCTION 'CONTROL_FLUSH'.
ENDCASE.
CLEAR cmd.
CALL FUNCTION 'CONTROL_FLUSH'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR url.
PERFORM get_file_name.
PERFORM load_html_page.
*& Form get_page_name
Get Page Name
FORM get_file_name.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
def_path = 'C: '
mask = ',.,..'
mode = 'o'
title = 'Browse to Open'
IMPORTING
filename = url
RC =
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDFORM. " get_page_name
*& Form load_html_page
TO load the file (URL)
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 6
FORM load_html_page.
CALL FUNCTION 'HTMLCNTL_SHOW_URL'
EXPORTING
h_control = h_html_ctrl
url = url.
IF sy-subrc <> 0.
EXIT.
ENDIF.
flag = 'X'.
ENDFORM. " load_html_page
*& Form get_current_url
Get Current URL
FORM get_current_url.
CALL FUNCTION 'HTMLCNTL_GET_CURRENT_URL'
EXPORTING
h_control = h_html_ctrl
IMPORTING
url = url.
ENDFORM. " get_current_url
Callback form for the event 'NavigateComplete'
callback on_control_event.
CALL FUNCTION 'CONTROL_GET_EVENT_PARAM'
EXPORTING
h_control = h_html_ctrl
param_id = 0
CHANGING
return = url.
PERFORM get_current_url.
endcallback.
Reward Points if it is helpful
Thanks
Seshu -
Abap program to maintain variants in RSRPARAMETRIZA
Hi,
SAP provided an ABAP example to maintain 3.5 variants in NW04s
Report Z_MASS_VARIANT_MAINTENANCE is available in the next u2018how tou2019 document.
[http://www.sapadvisors.com/resources/HowtoInformationBroadcasting.pdf]
This is only helpfull if you use 3.5 workbooks.
7.0 workbook variants are not save in RSRVARIANT anymore. 7.0 variants are saved in table-field RSRPARAMETRIZA-STRING (xml field with selection values).
I need to develop a program to maintain this variants. Can anybody save me some time and send me similar abap program for 7.0 workbooks ?
Thanks,
PedroHi,
Bruno is right about class CL_RSR_PARA.
This is an abap example is used to maintain 'ZRT_M4M_Q0016' Query variants. In this case variant BC_SALST001 is updated.
If you need to update different report variant you have to change the 'form create_variant'.
In this variant I'm updating:
- 0S_MAT: empty
- 0S_MATGR: 5300-5399
- ZMM_STA2: Z0;ZZ
*& Program to mass update BEx Variants within SAP Netwever 2004s
REPORT Z_MASS_FR_BROADCAST_0003 .
constants: C_PARAMNM type RSPARAMNM value 'BC_SALST001'.
---> TYPE DEFININTIONS --->
NOTE: Ripped from class CL_RSR_PARA
TYPES: BEGIN OF t_sx_int_var_value,
vnam TYPE rszvnam,
data_prov TYPE string,
range TYPE STANDARD TABLE OF rrrange WITH DEFAULT KEY
INITIAL SIZE 1,
END OF t_sx_int_var_value.
TYPES: t_tx_int_var_value TYPE STANDARD TABLE OF t_sx_int_var_value
WITH DEFAULT KEY
INITIAL SIZE 1.
<- TYPE DEFININTIONS <-
DATA: l_s_rsrparametriza type rsrparametriza.
DATA: l_s_range type rrrange.
DATA: l_s_sx_int_var_value type t_sx_int_var_value.
DATA: r_tsx_values type t_tx_int_var_value.
perform create_variant.
l_s_rsrparametriza-paramnm = c_paramnm.
l_s_rsrparametriza-objvers = 'A'.
l_s_rsrparametriza-parentcomponent = '1'.
l_s_rsrparametriza-workbookid = ''.
l_s_rsrparametriza-eltuid = 'ZRT_M4M_Q0016'.
l_s_rsrparametriza-plnfuncnm = ''.
l_s_rsrparametriza-template = ''.
l_s_rsrparametriza-planningseqeunce = ''.
l_s_rsrparametriza-version = ''.
l_s_rsrparametriza-personal = ''.
l_s_rsrparametriza-owner = sy-uname.
CALL TRANSFORMATION
id
SOURCE page = r_tsx_values
RESULT XML l_s_rsrparametriza-content.
get time stamp field l_s_rsrparametriza-timestmp.
l_s_rsrparametriza-conttimestmp = ''. " fix
*For security reasons I just change existing variants field.
update rsrparametriza
set content = l_s_rsrparametriza-content
where PARAMNM eq c_paramnm
and OBJVERS eq 'A'.
If sy-subrc eq '0'.
Write: 'Update sucessfull'.
else.
Write: 'No update: Probably variant does not exist'.
endif.
form create_variant.
*0S_MAT
clear l_s_sx_int_var_value.
l_s_sx_int_var_value-vnam = '0S_MAT'.
l_s_sx_int_var_value-data_prov = 'DP_4'.
" no selections
append l_s_sx_int_var_value to r_tsx_values.
*0S_MATGR
clear l_s_sx_int_var_value.
l_s_sx_int_var_value-vnam = '0S_MATGR'.
l_s_sx_int_var_value-data_prov = 'DP_4'.
clear l_s_range.
l_s_range-sign = 'E'.
l_s_range-opt = 'BT'.
l_s_range-low = '5300'.
l_s_range-high = '5399'.
append l_s_range to l_s_sx_int_var_value-range.
append l_s_sx_int_var_value to r_tsx_values.
*ZMM_STA2
clear l_s_sx_int_var_value.
l_s_sx_int_var_value-vnam = 'ZMM_STA2'.
l_s_sx_int_var_value-data_prov = 'DP_4'.
clear l_s_range.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = 'ZO'.
l_s_range-high = ''.
append l_s_range to l_s_sx_int_var_value-range.
l_s_range-low = 'ZZ'.
append l_s_range to l_s_sx_int_var_value-range.
append l_s_sx_int_var_value to r_tsx_values.
That's all
Pedro
Maybe you are looking for
-
TS3988 How do I add additional devices to my iCloud storage?
I have recently purchased an iPhone 5s. I keep getting a message saying my iPhone cannot be backed up because there isn't enough iCloud storage available yet I have 7GB available. Can anyone advise how I add this new phone to my existing iCloud stor
-
hello all, is there a way to convert a table with header line to a structure? thanks in advanced' dana.
-
Hello, is it possible to add an additional folder to the EAR-File (for example a folder with properties-Files for easier administration of an application) except WAR- or JAR-Files? Best regards Mathias
-
EP 6.0, ESS 50.4, ITS 6.20, ERP 4.72 No longer supported by SAP When the Enrollment Detail (PZ14) screen is opened in the portal, the dropdown boxes for Health Plan Option and Dependent Coverage are not in the correct place on the page. I have tried
-
Hi, I'm trying to learn how to make a simple game, and I'm having trouble with my keyUp code. When I press "W" on the keyboard mc1 will play, and when I let go "W" mc1 will stop. Now here's the trouble, when I press "W" then I press "A" (keeping "W"