Get Workitem container data in ABAP OO
Hello!
I have some problem in workflow by using ABAP OO.
I have a class whith method display in current workitem.
In this method how can get container data like wiid etc.?
In this case you could only use, what's either available in the work item container or what the business object (here: WORKITEM) provides.
As you need a whole bunch of information, it will be best to read it from the database within the .Display-Method, but I would suggest, that you use the structure/table SWWWIHEAD (which is mostly similar to SWWLHEAD structure).
You'd do it this way:
METHOD Display.
DATA: l_workitem_header TYPE swwwihead.
SELECT SINGLE * FROM swwwihead
INTO l_workitem_header
WHERE wi_id = i_wi_id.
IF sy-subrc <> 0.
"Something is wrong here, as the work item is not valid
"... do some exception handling there or end method with message,
"such as MESSAGE S....
EXIT.
ENDIF.
"... Detailed data of current workitem is now
"... in struct l_workitem_header
ENDMETHOD.
Similar Messages
-
Play with workflow container data
Hi, Experts
I want to read workitem container data using the FM 'SAP_WAPI_READ_CONTAINER', but
the element in workitem container is a structure type or table type, and length is more than
255 character.
How to do it? Thanks you very much!
Ken.liHi Pavan,
The 10 open question rule applies to all questions opened since July 2008.
Already existing open questions prior to July 2008 were not "retro-fitted" with the rule.
Note: The "Comment" field is not mandatory when closing old threads
Cheers,
Julius -
How can i get the external Sql result return data to abap?
Dear All
I have a problem to how to get the select result data return abap.
I used abap to run external SQL server. below is my code:
***in above ,abap has already connected external SQL.
Sql = u2018select * from user01u2019
CALL METHOD OF rec 'Open'
EXPORTING #1 = sql
#2 = con
#3 = '1'.
IF NOT sy-subrc = 0.
MESSAGE e000 WITH 'run external sql error!'.
ENDIF.
***now ,below code how can I get the select result to abap code?
I know I can use native_sql such as u2018OPEN CUR1 FOR SELECT * FROM user01 AND FETCH NEXT CUR1 INTO :WAu2019.
Thanks for all
SunThanks.
it is okay now by myself.
con_str = 'Provider=SQLOLEDB.1;Password=pwd;Persist Security Info=True;User ID=name;Initial Catalog=VTL_DEMO;Data Source=192.168.21.50'.
CREATE OBJECT o_conn 'ADODB.Connection'.
CREATE OBJECT o_rec 'ADODB.Recordset'.
SET PROPERTY OF o_conn 'Provider' = provider.
SET PROPERTY OF o_conn 'ConnectionString' = con_str.
CALL METHOD OF o_conn 'Open'.
sql_str = 'select * from userh'.
CALL METHOD OF o_conn 'Execute' = o_recordset
EXPORTING
#1 = sql_str.
#2 = o_conn.
GET PROPERTY OF o_recordset 'EOF' = rs_eof.
REFRESH itab.
WHILE rs_eof NE 1.
CALL METHOD OF o_recordset 'fields' = o_field
EXPORTING
#1 = 0.
GET PROPERTY OF o_field 'Value' = itab-name.
CALL METHOD OF o_recordset 'fields' = o_field
EXPORTING
#1 = 1.
GET PROPERTY OF o_field 'Value' = itab-cid.
APPEND itab.
CALL METHOD OF o_recordset 'MoveNext'.
GET PROPERTY OF o_recordset 'EOF' = rs_eof.
ENDWHILE. -
ABAP: Get parent container
Hello,
In my action handler method I have an ID of the element that triggered this event, lets call it ELEMENT_A.
I need to get UI element (let's call it container_element) that contains ELEMENT_A.
I know that this container_element is type of cl_wd_transparent_container.
How can this be done?
Thank you.Hi Georgy,
You could get reference to the UI element and then use GET_PARENT method to get the container. Ofcourse, you should use VIEW for this.
I have successfully used the following code to get refernce of a dropdown in a table. On similar lines, I guess you could get the container refernce.
data wd_table_cell_editor type ref to cl_Wd_view_element.
data wd_table_column type ref to cl_wd_table_column.
wd_table_cell_editor ?= wd_this->m_view->get_element( ID ).
wd_table_column ?= wd_table_cell_editor->get__parent( ).
DATA: THE_TABLE_CELL_EDITOR type ref to CL_WD_DROPDOWN_BY_KEY,
dropdown_value type string.
THE_TABLE_CELL_EDITOR ?= wd_table_column->GET_TABLE_CELL_EDITOR( ).
CALL METHOD THE_TABLE_CELL_EDITOR->GET_SELECTED_KEY
EXPORTING
CONTEXT_ELEMENT =
CONTEXT_NODE_PATH_NAME =
RECEIVING
VALUE = dropdown_value.
I have declared M_VIEW as an attribute(TYPE REF TO IF_WD_VIEW) in my view and used the following code in WDDOMODIFYVIEW method.
if first_time = abap_true.
wd_this->m_view = view.
endif.
Regards,
Srini. -
How to get workitem id in ABAP-Webdynpro application
Hai All,
When a user clicks on a work item in universal worklist, a ABAP-Webdynpro screen is called. I want to pass the workitem number to this ABAP-Webdynpro application.
Please let me know how to pass this.
Thanks & Regards,
H.K.Hayath Basha.Hai Kari,
Thanks for the link, i am looking into it.
Hai Naresh,
Where should I give this link,
http://abc.com:8001/sap/bc/webdynpro/sap/ztest? param1= Val
What I have done is,
In SWFVISU transaction I maintained the following entry,
Task = TS99000208
Visualization Type = WD_ABAP
Visualization Parameter Visualization Parameter value
APPLICATION = ZWD_OFFICIAL_012
NAMESPACE = SAP
and registered this task in in universal worklist.
Where the specify the code you mentioned.
Thanks & Regards,
H.K.Hayath Basha. -
How to get the decision key in abap program
Hi guys.
I have a user decision workflow that have two options: Accept or Reject. This options has some type of id, right? Like '0001', '0002', right?
How i get this ids decisions through a abap program.
I need to know this because i have to pass this id to a Z Function Model.
Thanks!The result is found in the workitem container in the '_RESULT' or '_WI_RESULT' elements, you can use the SAP_WAPI_READ_CONTAINER function module to read the data (read the element from the simple container returned table).
CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
EXPORTING
workitem_id = im_wi_id
TABLES
simple_container = lt_container
READ TABLE lt_container WITH KEY element = '_WI_RESULT' into ls_container.
If you what to get the possible decisions description you can use the SAP_WAPI_DECISION_READ function module,
CALL FUNCTION 'SAP_WAPI_DECISION_READ'
EXPORTING
workitem_id = im_wi_id
TABLES
alternatives = lt_alts. -
Error while exporting data from ABAP to Excel
Hello All,
iam trying to download data from ABAP scrn to Excel using I_OI_SPREADSHEET METHODS. I get an error in method 'SET_RANGES_DATA' - 'Memory protection fault occurred in document interface'.
I have pasted my code below. Kindly help me to solve this issue.
Create container ??
CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING
control = g_control
error = g_error.
Initialize
CALL METHOD g_control->init_control
EXPORTING
r3_application_name = 'Basis'
parent = g_container
register_on_close_event = c_reg_on_close_event
register_on_custom_event = c_reg_on_custom_event
no_flush = c_no_flush
IMPORTING
error = g_error.
Set Doc type
g_document_type = 'Excel.Sheet'.
Create Proxy
CALL METHOD g_control->get_document_proxy
EXPORTING
document_type = g_document_type
IMPORTING
document_proxy = g_document
error = g_error.
CALL METHOD g_document->create_document
EXPORTING
document_title = 'Excel'. "#EC NOTEXT
CALL METHOD g_document->get_spreadsheet_interface
IMPORTING
sheet_interface = g_handle.
CHECK g_document IS NOT INITIAL.
read selected line data from gtab
READ TABLE g_tab_data INDEX 1 INTO l_wa_pos_trans.
Get Field Descriptions
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = 'TRIGS_EXPORT_EXCEL'
langu = sy-langu
TABLES
dfies_tab = lt_dfies
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Header for User Data
l_h_cnt = 1.
LOOP AT lt_dfies INTO lwa_dfies.
IF lwa_dfies-fieldname EQ 'USER_ID' OR
lwa_dfies-fieldname EQ 'EXCEL_DATE' OR
lwa_dfies-fieldname EQ 'EXCEL_TIME' OR
lwa_dfies-fieldname EQ 'SECURITY_ACCOUNT' OR
lwa_dfies-fieldname EQ 'SECURITY_ID' OR
lwa_dfies-fieldname EQ 'COMPANY_CODE'.
PERFORM fill_cell USING l_h_cnt 1 1 lwa_dfies-scrtext_m.
l_h_cnt = l_h_cnt + 1.
ENDIF.
ENDLOOP.
Fill Header Values
PERFORM fill_cell USING 1 2 1 sy-uname.
PERFORM fill_cell USING 2 2 1 sy-datum.
PERFORM fill_cell USING 3 2 1 sy-uzeit.
PERFORM fill_cell USING 4 2 1 l_wa_pos_trans-company_code .
PERFORM fill_cell USING 5 2 1 l_wa_pos_trans-security_account.
PERFORM fill_cell USING 6 2 1 l_wa_pos_trans-security_id.
Texts
l_h_cnt = l_h_cnt + 1.
PERFORM fill_cell USING l_h_cnt 1 1 text-011.
PERFORM fill_cell USING l_h_cnt 3 1 text-012.
Range for header
range_item-name = 'RANGE1'.
range_item-rows = '7'.
range_item-columns = '3'.
range_item-code = g_handle->spreadsheet_insertall.
APPEND range_item TO range_list.
CALL METHOD g_handle->set_selection
EXPORTING
left = 1
top = 1
rows = 7
columns = 3
IMPORTING
retcode = retcode.
CALL METHOD g_handle->insert_range
EXPORTING
columns = 3
rows = 7
name = 'RANGE1'
IMPORTING
retcode = retcode.
CALL METHOD g_handle->set_ranges_data
EXPORTING
ranges = range_list
contents = gt_cell_data
IMPORTING
retcode = retcode.
Columns for PC
CLEAR: gt_cell_data[].
l_pc_cnt = l_h_cnt + 1.
LOOP AT lt_dfies INTO lwa_dfies.
IF lwa_dfies-fieldname EQ 'SBWHR' OR
lwa_dfies-fieldname CP '_PC'.
PERFORM fill_cell USING l_pc_cnt 1 0 lwa_dfies-scrtext_m.
l_pc_cnt = l_pc_cnt + 1.
ENDIF.
ENDLOOP.
Pos Curr - Values
PERFORM fill_cell USING 9 2 0 trls_position_value-sbwhr.
PERFORM fill_cell USING 10 2 0 trls_position_value-purch_pc.
PERFORM fill_cell USING 11 2 0 trls_position_value-charge_pc.
PERFORM fill_cell USING 12 2 0 trls_position_value-impmnt_pc.
PERFORM fill_cell USING 13 2 0 trls_position_value-amort_pc.
PERFORM fill_cell USING 14 2 0 trls_position_value-val_ti_pc.
PERFORM fill_cell USING 15 2 0 trls_position_value-val_idx_pc.
PERFORM fill_cell USING 16 2 0 trls_position_value-val_ch_ti_pc.
PERFORM fill_cell USING 17 2 0 trls_position_value-val_ti_npl_pc.
PERFORM fill_cell USING 18 2 0 trls_position_value-val_idx_npl_pc.
PERFORM fill_cell USING 19 2 0 trls_position_value-val_ch_ti_npl_pc.
PERFORM fill_cell USING 20 2 0 trls_position_value-book_val_pc.
Columns for VC
l_vc_cnt = l_h_cnt + 1.
LOOP AT lt_dfies INTO lwa_dfies.
IF lwa_dfies-fieldname EQ 'SBWHR' OR
lwa_dfies-fieldname CP '_VC'.
PERFORM fill_cell USING l_vc_cnt 3 0 lwa_dfies-scrtext_m.
l_vc_cnt = l_vc_cnt + 1.
ENDIF.
ENDLOOP.
Val Curr
PERFORM fill_cell USING 9 4 0 trls_position_value-svwhr.
PERFORM fill_cell USING 10 4 0 trls_position_value-purch_vc.
PERFORM fill_cell USING 11 4 0 trls_position_value-charge_vc.
PERFORM fill_cell USING 12 4 0 trls_position_value-impmnt_vc.
PERFORM fill_cell USING 13 4 0 trls_position_value-amort_vc.
PERFORM fill_cell USING 14 4 0 trls_position_value-val_ti_vc.
PERFORM fill_cell USING 15 4 0 trls_position_value-val_fx_vc.
PERFORM fill_cell USING 16 4 0 trls_position_value-val_idx_vc.
PERFORM fill_cell USING 17 4 0 trls_position_value-val_ch_ti_vc.
PERFORM fill_cell USING 18 4 0 trls_position_value-val_ch_fx_vc.
PERFORM fill_cell USING 19 4 0 trls_position_value-val_fx_npl_vc.
PERFORM fill_cell USING 20 4 0 trls_position_value-val_ti_npl_vc.
PERFORM fill_cell USING 21 4 0 trls_position_value-val_idx_npl_vc.
PERFORM fill_cell USING 22 4 0 trls_position_value-val_ch_ti_npl_vc.
PERFORM fill_cell USING 23 4 0 trls_position_value-val_ch_fx_npl_vc.
PERFORM fill_cell USING 24 4 0 trls_position_value-book_val_vc.
Range for PC and VC
CLEAR: range_list[].
range_item-name = 'RANGE2'.
range_item-rows = '17'.
range_item-columns = '4'.
range_item-code = g_handle->spreadsheet_insertall.
APPEND range_item TO range_list.
CALL METHOD g_handle->set_selection
EXPORTING
left = 1
top = 9
rows = 17
columns = 4
IMPORTING
retcode = retcode.
CALL METHOD g_handle->insert_range
EXPORTING
columns = 4
rows = 17
name = 'RANGE2'
IMPORTING
retcode = retcode.
CALL METHOD g_handle->set_ranges_data
EXPORTING
ranges = range_list
contents = gt_cell_data
IMPORTING
retcode = retcode.
***********************************Form routine****************
FORM fill_cell USING i j bold val.
DATA:
wa_cell_data TYPE soi_generic_item.
wa_cell_data-row = i.
wa_cell_data-column = j.
wa_cell_data-value = val.
APPEND wa_cell_data TO gt_cell_data.
ENDFORM. "FILL_CELLSolved
-
Get content document in WD abap
Hi all,
I need to get the content of a document (BINARY or XSTRING) in a WD abap.
I know the following values:
- doknr
- dokar
- dokvr
- doktl
Can anybody helps me?hallo, Kata!
the files are stored in the system with the help of Knowledge Provider. Every document has unique PHIO and LOIO attributes.
if you know storage name of documents you can get PHIO of the folder where data is kept. futhermore you can get the list of all documents stored in that folder and select the required one. after that use function module:
SKWF_PHIO_LOAD_CONTENT
exporting to this module PHIO attributes of your object in import you'll get a table of type sdokcntbin
this table contains data in binary format
Note: with the help of SCMS_BINARY_TO_XSTRING you'll convert data to XSTRING -
Error during VM container communication between ABAP and JAVA
Hello,
While creation of SC, I am getting error "Error during VM container communication between ABAP and JAVA"
Based on earlier responses in this forum, I checked following activity.
1. T Code - BBP_CND_CHECK_CUST
Result - IPC Pricing is Active and IPC is now running in VMC
2. Run Report - RSVMCRT_HEALTH_CHECK
Result - The Java component is deactivated
3. As per OSS note 854170, Profile parameters were existed as below
a) vmcj/enable - on
b) vmcj/option/maxJavaHeap = 200M
So, How to get Java component activated?
Thanks,
Rahul MandaleThanks Markus,
For SM53, I am getting resulets as " Java is not active on this application server - Message no. SVMCRT011"
Can you suggest, what I need to do for it? I can't use SRM Shopping cart because of it. thanks in advance, Rahul
and dev_w0 trace ....
trc file: "dev_w0", trc level: 1, release: "700"
ACTIVE TRACE LEVEL 1
ACTIVE TRACE COMPONENTS all, MJ
B
B Wed Aug 31 15:45:40 2011
B create_con (con_name=R/3)
B Loading DB library 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' ...
B Library 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' loaded
B Version of 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' is "700.08", patchlevel (0.46)
B New connection 0 created
M sysno 04
M sid CUS
M systemid 560 (PC with Windows NT)
M relno 7000
M patchlevel 0
M patchno 52
M intno 20050900
M make: multithreaded, Unicode, optimized
M pid 456
M
M kernel runs with dp version 210000(ext=109000) (@(#) DPLIB-INT-VERSION-210000-UC)
M length of sys_adm_ext is 572 bytes
M ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 456) [dpxxdisp.c 1293]
I MtxInit: 30000 0 0
M DpSysAdmExtCreate: ABAP is active
M DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
M DpShMCreate: sizeof(wp_adm) 18304 (1408)
M DpShMCreate: sizeof(tm_adm) 3954072 (19672)
M DpShMCreate: sizeof(wp_ca_adm) 24000 (80)
M DpShMCreate: sizeof(appc_ca_adm) 8000 (80)
M DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
M DpShMCreate: sizeof(comm_adm) 528064 (1048)
M DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
M DpShMCreate: sizeof(file_adm) 0 (72)
M DpShMCreate: sizeof(vmc_adm) 0 (1452)
M DpShMCreate: sizeof(wall_adm) (38456/34360/64/184)
M DpShMCreate: sizeof(gw_adm) 48
M DpShMCreate: SHM_DP_ADM_KEY (addr: 05C00040, size: 4613144)
M DpShMCreate: allocated sys_adm at 05C00040
M DpShMCreate: allocated wp_adm at 05C01E28
M DpShMCreate: allocated tm_adm_list at 05C065A8
M DpShMCreate: allocated tm_adm at 05C065D8
M DpShMCreate: allocated wp_ca_adm at 05FCBB70
M DpShMCreate: allocated appc_ca_adm at 05FD1930
M DpShMCreate: allocated comm_adm at 05FD3870
M DpShMCreate: system runs without file table
M DpShMCreate: allocated vmc_adm_list at 06054730
M DpShMCreate: allocated gw_adm at 06054770
M DpShMCreate: system runs without vmc_adm
M DpShMCreate: allocated ca_info at 060547A0
M DpShMCreate: allocated wall_adm at 060547A8
X EmInit: MmSetImplementation( 2 ).
X MM diagnostic options set: 0
X <ES> client 0 initializing ....
X Using implementation flat
M <EsNT> Memory Reset disabled as NT default
X ES initialized.
M
M Wed Aug 31 15:45:41 2011
M ThInit: running on host crmsys
M
M Wed Aug 31 15:45:42 2011
M calling db_connect ...
C Prepending D:\usr\sap\CUS\DVEBMGS04\exe to Path.
C
C Wed Aug 31 15:45:47 2011
C Client NLS settings: AMERICAN_AMERICA.UTF8
C Logon as OPS$-user to get SAPSR3's password
C Connecting as /@CRM on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
C Nls CharacterSet NationalCharSet C EnvHp ErrHp ErrHpBatch
C 0 UTF8 1 0619F158 061A46F4 061A3F7C
C Attaching to DB Server CRM (con_hdl=0,svchp=061A3EC8,svrhp=061B5794)
C Starting user session (con_hdl=0,svchp=061A3EC8,srvhp=061B5794,usrhp=061CA558)
C
C Wed Aug 31 15:45:48 2011
C Now '/@CRM' is connected (con_hdl 0, nls_hdl 0).
C Got SAPSR3's password from OPS$-user
C Disconnecting from connection 0 ...
C Closing user session (con_hdl=0,svchp=061A3EC8,usrhp=061CA558)
C Now I'm disconnected from ORACLE
C Connecting as SAPSR3/<pwd>@CRM on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
C Nls CharacterSet NationalCharSet C EnvHp ErrHp ErrHpBatch
C 0 UTF8 1 0619F158 061A46F4 061A3F7C
C Starting user session (con_hdl=0,svchp=061A3EC8,srvhp=061B5794,usrhp=061CA558)
C Now 'SAPSR3/<pwd>@CRM' is connected (con_hdl 0, nls_hdl 0).
C Database NLS settings: AMERICAN_AMERICA.UTF8
C Database instance CRM is running on CRMSYS with ORACLE version 10.2.0.1.0 since 20110831
B
B Wed Aug 31 15:45:49 2011
B Connection 0 opened (DBSL handle 0)
B Wp Hdl ConName ConId ConState TX PRM RCT TIM MAX OPT Date Time DBHost
B 000 000 R/3 000000000 ACTIVE NO YES NO 000 255 255 20110831 154542 CRMSYS
M db_connect o.k.
M ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif
I
I Wed Aug 31 15:46:12 2011
I MtxInit: 0 0 0
M SHM_PRES_BUF (addr: 0A7C0040, size: 4400000)
M SHM_ROLL_AREA (addr: 788A0040, size: 61440000)
M SHM_PAGING_AREA (addr: 0AC00040, size: 32768000)
M SHM_ROLL_ADM (addr: 0CB50040, size: 615040)
M SHM_PAGING_ADM (addr: 0CBF0040, size: 525344)
M ThCreateNoBuffer allocated 544152 bytes for 1000 entries at 0CC80040
M ThCreateNoBuffer index size: 3000 elems
M ThCreateVBAdm allocated 12160 bytes (50 server) at 0CD10040
X EmInit: MmSetImplementation( 2 ).
X MM diagnostic options set: 0
X <ES> client 0 initializing ....
X Using implementation flat
X ES initialized.
B db_con_shm_ini: WP_ID = 0, WP_CNT = 13, CON_ID = -1
B dbtbxbuf: Buffer TABL (addr: 10E700C8, size: 30000000, end: 12B0C448)
B dbtbxbuf: Buffer TABLP (addr: 12B100C8, size: 10240000, end: 134D40C8)
B dbexpbuf: Buffer EIBUF (addr: 0FBA00D0, size: 4194304, end: 0FFA00D0)
B dbexpbuf: Buffer ESM (addr: 134E00D0, size: 4194304, end: 138E00D0)
B dbexpbuf: Buffer CUA (addr: 138F00D0, size: 3072000, end: 13BDE0D0)
B dbexpbuf: Buffer OTR (addr: 13BE00D0, size: 4194304, end: 13FE00D0)
M rdisp/reinitialize_code_page -> 0
M icm/accept_remote_trace_level -> 0
M rdisp/no_hooks_for_sqlbreak -> 0
M CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
S
S Wed Aug 31 15:46:15 2011
S *** init spool environment
S initialize debug system
T Stack direction is downwards.
T debug control: prepare exclude for printer trace
T new memory block 1946AA80
S
S Wed Aug 31 15:46:16 2011
S spool kernel/ddic check: Ok
S using table TSP02FX for frontend printing
S 1 spool work process(es) found
S frontend print via spool service enabled
S printer list size is 150
S printer type list size is 50
S queue size (profile) = 300
S hostspool list size = 3000
S option list size is 30
S found processing queue enabled
S found spool memory service RSPO-RCLOCKS at 1D6D00A8
S doing lock recovery
S setting server cache root
S found spool memory service RSPO-SERVERCACHE at 1D6D0430
S using messages for server info
S size of spec char cache entry: 297028 bytes (timeout 100 sec)
S size of open spool request entry: 2132 bytes
S immediate print option for implicitely closed spool requests is disabled
A
A Wed Aug 31 15:46:18 2011
A
A -PXA--
A PXA INITIALIZATION
A PXA: Fragment Size too small: 73 MB, reducing # of fragments
A System page size: 4kb, total admin_size: 5132kb, dir_size: 5076kb.
A Attached to PXA (address 688A0040, size 150000K)
A abap/pxa = shared protect gen_remote
A PXA INITIALIZATION FINISHED
A -PXA--
A
A
A Wed Aug 31 15:46:20 2011
A ABAP ShmAdm attached (addr=57A40000 leng=20955136 end=58E3C000)
A >> Shm MMADM area (addr=57EB5E58 leng=126176 end=57ED4B38)
A >> Shm MMDAT area (addr=57ED5000 leng=16150528 end=58E3C000)
A RFC Destination> destination crmsys_CUS_04 host crmsys system CUS systnr 4 (crmsys_CUS_04)
A
A Wed Aug 31 15:46:21 2011
A RFC Options> H=crmsys,S=04,d=2,
A RFC FRFC> fallback activ but this is not a central instance.
A
A RFC rfc/signon_error_log = -1
A RFC rfc/dump_connection_info = 0
A RFC rfc/dump_client_info = 0
A RFC rfc/cp_convert/ignore_error = 1
A RFC rfc/cp_convert/conversion_char = 23
A RFC rfc/wan_compress/threshold = 251
A RFC rfc/recorder_pcs not set, use defaule value: 2
A RFC rfc/delta_trc_level not set, use default value: 0
A RFC rfc/no_uuid_check not set, use default value: 0
A RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
A RFC Method> initialize RemObjDriver for ABAP Objects
M ThrCreateShObjects allocated 13730 bytes at 0FFB0040
N
N Wed Aug 31 15:46:22 2011
N SsfSapSecin: putenv(SECUDIR=D:\usr\sap\CUS\DVEBMGS04\sec): ok
N
N =================================================
N === SSF INITIALIZATION:
N ===...SSF Security Toolkit name SAPSECULIB .
N ===...SSF trace level is 0 .
N ===...SSF library is D:\usr\sap\CUS\DVEBMGS04\exe\sapsecu.dll .
N ===...SSF hash algorithm is SHA1 .
N ===...SSF symmetric encryption algorithm is DES-CBC .
N ===...sucessfully completed.
N =================================================
N
N Wed Aug 31 15:46:23 2011
N MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
N MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
M JrfcVmcRegisterNativesDriver o.k.
W =================================================
W === ipl_Init() called
B dbtran INFO (init_connection '<DEFAULT>' [ORACLE:700.08]):
B max_blocking_factor = 15, max_in_blocking_factor = 5,
B min_blocking_factor = 10, min_in_blocking_factor = 5,
B prefer_union_all = 0, prefer_join = 0,
B prefer_fix_blocking = 0, prefer_in_itab_opt = 1,
B convert AVG = 0, alias table FUPD = 0,
B escape_as_literal = 1, opt GE LE to BETWEEN = 0,
B select * =0x0f, character encoding = STD / <none>:-,
B use_hints = abap->1, dbif->0x1, upto->2147483647, rule_in->0,
B rule_fae->0, concat_fae->0, concat_fae_or->0
W
W Wed Aug 31 15:46:24 2011
W ITS Plugin: Path dw_gui
W ITS Plugin: Description ITS Plugin - ITS rendering DLL
W ITS Plugin: sizeof(SAP_UC) 2
W ITS Plugin: Release: 700, [7000.0.52.20050900]
W ITS Plugin: Int.version, [32]
W ITS Plugin: Feature set: [10]
W ===... Calling itsp_Init in external dll ===>
W === ipl_Init() returns 0, ITSPE_OK: OK
W =================================================
E Enqueue Info: rdisp/wp_no_enq=1, rdisp/enqname=<empty>, assume crmsys_CUS_04
E Replication is disabled
E EnqCcInitialize: local lock table initialization o.k.
E EnqId_SuppressIpc: local EnqId initialization o.k.
E EnqCcInitialize: local enqueue client init o.k.
B
B Wed Aug 31 15:46:48 2011
B table logging switched off for all clients
M
M Wed Aug 31 15:47:55 2011
M SecAudit(RsauShmInit): WP attached to existing shared memory.
M SecAudit(RsauShmInit): addr of SCSA........... = 05BD0040
M SecAudit(RsauShmInit): addr of RSAUSHM........ = 05BD07A8
M SecAudit(RsauShmInit): addr of RSAUSLOTINFO... = 05BD07E0
M SecAudit(RsauShmInit): addr of RSAUSLOTS...... = 05BD07EC
A
A Wed Aug 31 15:48:44 2011
A RFC FRFC> fallback on the central gateway crmsys sapgw04 activ
B
B Wed Aug 31 15:49:47 2011
B dbmyclu : info : my major identification is 3232288873, minor one 4.
B dbmyclu : info : Time Reference is 1.12.2001 00:00:00h GMT.
B dbmyclu : info : my initial uuid is D98FA690E8AA314D9B69930868792664.
B dbmyclu : info : current optimistic cluster level: 0
B dbmyclu : info : pessimistic reads set to 2. -
Error in reading workflow container data and populate it in web dynpro pdf
Hi,
Please advise on the following issue.
I have an adobe interactive form built inside a webdynpro java application, on a RFC call this form is sent as an xstring and the BAPI triggers a workflow in the backend. At any point of time, on passing a workitem id, a custom function module returns the form data that exists in the workflow as an xstring back to webdynpro java, intenally this custom FM iterates through the internal table binary contents for IT_SOLIX_TAB and produces an xstring format out of this binary content. This xstring is passed back to the webdynpro java application so that the contents can be displayed in a pdf.
I assume that since the data source context structure which has to be populated with this wf container form data is exactly the same as the one which generated this pdf in webdynpro java before the workflow trigger, the WDINTERACTIVEFORMHELPER.transer.... method should be sufficient to re-populate the wd java based pdf with wf container data.
But I am unable to do this as I am getting "PDFDocument processor failed to process input pdf request" at this step. Though I can see that the RFC is returning the binary data
Versions : ALD 8.1, CE 7.1 SP5 NWDS, Adobe reader 9
Awaiting your inputs.
Thanks
LishaHi Hari,
Why do you use a FM to read the container? You couldn't use bindings? Or are you reading the container of the workflow in a separate program?
Are you sure the container element is filled when the workflow is started? If so how is it filled, in the event binding?
Regards,
Martin -
What is procedure for creating new vendor and material master data in ABAP
What is procedure for creating new vendor and material master data in ABAP .
see below code which is used for creation of vendor master as well as extension...
*& Report ZFC_VENDOR_CREATE *
REPORT ZFC_VENDOR_CREATE LINE-SIZE 100
NO STANDARD PAGE HEADING
MESSAGE-ID ZZ.
TABLES
TABLES : SSCRFIELDS. " Fields on selection screens
CONSTANTS
DATA : C_SPLIT TYPE C VALUE '#'. " Used for Has Separator in GUI_UPLAOD
TYPES
Int'table to hold Vendor Master Data
TYPES : BEGIN OF TY_VENDOR_MASTER,
FLAG TYPE C, " Update Flag
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
KTOKK TYPE KTOKK, " Account Group
ANRED TYPE ANRED, " Title
NAME1 TYPE NAME1_GP, " Name1
NAME2 TYPE NAME2_GP, " Name2
SORTL TYPE SORTL, " Search Term 1
SORT2 TYPE AD_SORT2UL, " Search Term 2
STRAS TYPE STRAS_GP, " Street
PSTLZ TYPE PSTLZ, " Postal Code
ORT01 TYPE ORT01_GP, " City
REGIO TYPE REGIO, " Region
LAND1 TYPE LAND1_GP, " Country
SPRAS TYPE SPRAS, " Language
VBUND TYPE RASSC, " Trading Partner
BANKS TYPE BANKS, " Country
BANKL TYPE BANKK, " Bank Key
BANKN TYPE BANKN, " Bank Account
BKONT TYPE BKONT, " Bank Control Key
BANKA TYPE BANKA, " Name of Bank
AKONT TYPE AKONT, " Reconciliation Account
FDGRV TYPE FDGRV, " Cash Management Group
ZTERM TYPE DZTERM, " Payment Terms
REPRF TYPE REPRF, " Check Double Invoice
ZWELS TYPE DZWELS, " Payment Methods
XPORE TYPE XPORE, " Pay all items separately
END OF TY_VENDOR_MASTER,
Int'table to hold Vendor Extend Data
BEGIN OF TY_VENDOR_EXTEND,
FLAG TYPE C, " Update Flag
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
KTOKK TYPE KTOKK, " Account Group
REF_LIFNR TYPE LIFNR, " Reference Vendor Number
REF_BUKRS TYPE BUKRS, " Reference Company Code
AKONT TYPE AKONT, " Reconciliation Account
FDGRV TYPE FDGRV, " Cash Management Group
ZTERM TYPE DZTERM, " Payment Terms
REPRF TYPE REPRF, " Check Double Invoice
ZWELS TYPE DZWELS, " Payment Methods
XPORE TYPE XPORE, " Pay all items separately
END OF TY_VENDOR_EXTEND,
Int'table to hold Error Records Data
BEGIN OF TY_ERROR,
MSG(200) TYPE C, " To hold Message
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
END OF TY_ERROR.
DATA (Simple Fields)
DATA : W_COUNT TYPE I, " Variable to hold count of Records
W_SUCC_REC TYPE I, " No. of Success Records
W_SUCC_REC1 TYPE I, " No. of Updated Records
W_ERR_REC TYPE I, " No. of Error Records
w_noupdate_rec type i. " No. of Records not Changed
INTERNAL TABLES
Int'table to hold uploaded data from File
DATA : IT_VENDOR_MASTER TYPE STANDARD TABLE OF TY_VENDOR_MASTER,
WA_IT_VENDOR_MASTER TYPE TY_VENDOR_MASTER,
IT_VENDOR_EXTEND TYPE STANDARD TABLE OF TY_VENDOR_EXTEND,
WA_IT_VENDOR_EXTEND TYPE TY_VENDOR_EXTEND,
WA_IT_BDCDATA TYPE BDCDATA,
IT_BDCDATA TYPE STANDARD TABLE OF BDCDATA,
WA_IT_MESSTAB TYPE BDCMSGCOLL,
IT_MESSTAB TYPE STANDARD TABLE OF BDCMSGCOLL,
IT_ERROR TYPE STANDARD TABLE OF TY_ERROR,
WA_IT_ERROR TYPE TY_ERROR,
it_error_fk01 type standard table of ty_error,
wa_it_error_fk01 type ty_error,
it_error_fk02 type standard table of ty_error,
wa_it_error_fk02 type ty_error,
it_succ_rec1 type standard table of ty_error,
wa_it_succ_rec1 type ty_error,
it_noupdate type standard table of ty_error,
wa_it_noupdate type ty_error.
FLAGS
DATA : FL_FLAG1 TYPE C, " Flag to check error upload file
FL_FLAG2 TYPE C, " Flag to hold value
FL_FLAG3 TYPE C, " Flag to hold value
FL_FLAG4 TYPE C. " Flag to hold value
SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-001,
POSITION POS_LOW.
PARAMETERS : P_FILE(128) DEFAULT 'C:\UPLOAD.TXT' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-002,
POSITION POS_LOW.
PARAMETERS : P_VENMAS RADIOBUTTON GROUP R1 DEFAULT 'X'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-003,
POSITION POS_LOW.
PARAMETERS : P_VENEXT RADIOBUTTON GROUP R1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-004,
POSITION POS_LOW.
PARAMETERS : P_MODE(1) DEFAULT 'N'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-005,
POSITION POS_LOW.
PARAMETERS : P_GROUP(12) DEFAULT 'ZFC_VENDOR_C' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-016,
POSITION POS_LOW.
PARAMETERS : P_GROUP1(12) DEFAULT 'ZFC_VENDOR_U' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
Form to get file path for upload of data
PERFORM GET_FILE_PATH.
AT SELECTION-SCREEN ON BLOCK B1.
Form to Validate data specified on Selection Screen
CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
PERFORM VALIDATE_DATA.
START - OF - SELECTION
START-OF-SELECTION.
IF P_VENMAS = 'X'.
Form to upload data from Presentation Server for Vendor Master
PERFORM UPLOAD_DATA TABLES IT_VENDOR_MASTER.
IF FL_FLAG1 NE 'X'.
SORT IT_VENDOR_MASTER BY LIFNR BUKRS KTOKK.
DELETE IT_VENDOR_MASTER WHERE LIFNR = ' '
AND BUKRS = ' '
AND KTOKK = ' '.
Form to process data for Vendor Master
PERFORM INSERT_VENDOR_MASTER_DATA.
ENDIF.
ELSEIF P_VENEXT = 'X'.
Form to upload data from Presentation Server for Vendor Extend
PERFORM UPLOAD_DATA TABLES IT_VENDOR_EXTEND.
IF FL_FLAG1 NE 'X'.
SORT IT_VENDOR_EXTEND BY LIFNR BUKRS KTOKK.
DELETE IT_VENDOR_EXTEND WHERE LIFNR = ' '
AND BUKRS = ' '
AND KTOKK = ' '.
Form to process data for Vendor Master
PERFORM CHK_AND_INS_VENDOR_EXTEND_DATA.
ENDIF.
ENDIF.
END - OF - SELECTION
END-OF-SELECTION.
IF FL_FLAG1 NE 'X'.
FORMAT COLOR 7.
WRITE:/2 TEXT-O01. " Total Number of records read :
FORMAT COLOR OFF.
WRITE:40 W_COUNT.
FORMAT COLOR 7.
WRITE:/2 TEXT-O02. " Total Number of Success records :
FORMAT COLOR OFF.
WRITE:40 W_SUCC_REC.
FORMAT COLOR 7.
WRITE:/2 TEXT-O07. " Total Number of Updated records :
FORMAT COLOR OFF.
WRITE:40 W_SUCC_REC1.
FORMAT COLOR 7.
WRITE:/2 TEXT-O08. " Total Number of Unchanged records :
FORMAT COLOR OFF.
WRITE:40 W_noupdate_REC.
FORMAT COLOR 7.
WRITE:/2 TEXT-O03. " Total Number of Error records :
FORMAT COLOR OFF.
WRITE:40 W_ERR_REC.
if not it_succ_rec1 is initial.
skip 1.
perform display_changed_report.
endif.
if not it_noupdate is initial.
skip 1.
perform display_nochange_report.
endif.
IF NOT IT_ERROR IS INITIAL.
SKIP 3.
Form to display error data
PERFORM DISPLAY_ERROR_REPORT.
ENDIF.
IF FL_FLAG2 = 'X'.
SKIP 2.
FORMAT COLOR 4.
WRITE:/2 TEXT-O04. " BDC Session Name for Creation (FK01) :
FORMAT COLOR OFF.
WRITE:40 P_GROUP.
perform display_error_report_fk01.
ENDIF.
IF FL_FLAG3 = 'X'.
SKIP 2.
FORMAT COLOR 4.
WRITE:/2 TEXT-O09. " BDC Session Name for Updation (FK02) :
FORMAT COLOR OFF.
WRITE:40 P_GROUP1.
perform display_error_report_fk02.
ENDIF.
ENDIF.
*& Form GET_FILE_PATH
This form is used to get the specified path for uploading of data from
flat file with the help of F4 function key
FORM GET_FILE_PATH .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FILE.
ENDFORM. " GET_FILE_PATH
*& Form VALIDATE_DATA
This form is used to validate the data given by user on the Selection
Screen and the appropriate message is been displayed when an wrong
entry is inputted
FORM VALIDATE_DATA .
IF SY-BATCH EQ 'X'.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E001(ZZ) WITH TEXT-011.
" Excel file not to be used in Batch Mode
ENDIF.
IF P_MODE NE 'A' AND P_MODE NE 'N' AND P_MODE NE 'E'.
MESSAGE E001(ZZ) WITH TEXT-012.
" Session Mode should be either A or N or E
ENDIF.
ENDFORM. " VALIDATE_DATA
*& Form UPLOAD_DATA
This form is used to upload data from Presentation Server for either
Vendor Master or Vendor Extend
FORM UPLOAD_DATA TABLES P_IT_VENDOR.
DATA : L_FILENAME TYPE STRING,
L_FILETYPE TYPE CHAR10 VALUE 'ASC',
L_HEADER_LENGTH TYPE I VALUE 0,
L_READ_BY_LINE TYPE CHAR01 VALUE 'X'.
MOVE P_FILE TO L_FILENAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = L_FILENAME
FILETYPE = L_FILETYPE
HEADER_LENGTH = L_HEADER_LENGTH
READ_BY_LINE = L_READ_BY_LINE
HAS_FIELD_SEPARATOR = C_SPLIT
TABLES
DATA_TAB = P_IT_VENDOR
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF SY-SUBRC <> 0.
MESSAGE I001(ZZ) WITH TEXT-006 L_FILENAME.
MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
FL_FLAG1 = 'X'.
ELSEIF P_IT_VENDOR[] IS INITIAL.
MESSAGE I001(ZZ) WITH TEXT-014. " Uploaded File contains no data
FL_FLAG1 = 'X'.
ENDIF.
ENDFORM. " UPLOAD_DATA
*& Form INSERT_VENDOR_MASTER_DATA
This form is used to process BDC data for Vendor Master
FORM INSERT_VENDOR_MASTER_DATA .
DATA : L_LIFNR TYPE LIFNR.
CLEAR : L_LIFNR.
sort it_vendor_master by flag.
LOOP AT IT_VENDOR_MASTER INTO WA_IT_VENDOR_MASTER.
W_COUNT = W_COUNT + 1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_MASTER-LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_MASTER-LIFNR.
if wa_it_vendor_master-flag = 'A'.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_MASTER-LIFNR
AND BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
IF SY-SUBRC EQ 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
WA_IT_ERROR-MSG = TEXT-015.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_MASTER.
PERFORM CALL_TRANSACTION.
ENDIF.
CLEAR : WA_IT_VENDOR_MASTER.
elseif wa_it_vendor_master-flag = 'C'.
IF FL_FLAG2 = 'X' and fl_flag4 ne 'X'.
PERFORM CLOSE_BDC_SESSION.
fl_flag4 = 'X'.
ENDIF.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_MASTER.
PERFORM CALL_TRANSACTION_FK02.
CLEAR : WA_IT_VENDOR_MASTER.
elseif wa_it_vendor_master-flag = 'N'.
WA_IT_noupdate-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_noupdate-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
WA_IT_noupdate-MSG = TEXT-018.
APPEND WA_IT_noupdate TO IT_noupdate.
W_noupdate_REC = W_noupdate_REC + 1.
CLEAR : WA_IT_noupdate, WA_IT_VENDOR_MASTER.
endif.
ENDLOOP.
IF FL_FLAG3 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
ENDFORM. " INSERT_VENDOR_MASTER_DATA
*& Form POPULATE_BDC_DATA_VEN_MASTER
This form is used to populate BDC data of Vendor Master
FORM POPULATE_BDC_DATA_VEN_MASTER .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_MASTER-ZTERM
IMPORTING
OUTPUT = WA_IT_VENDOR_MASTER-ZTERM.
IF WA_IT_VENDOR_MASTER-REPRF = 'Y'.
WA_IT_VENDOR_MASTER-REPRF = 'X'.
ENDIF.
IF WA_IT_VENDOR_MASTER-XPORE = 'Y'.
WA_IT_VENDOR_MASTER-XPORE = 'X'.
ENDIF.
if wa_it_vendor_master-flag = 'A'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0105',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_MASTER-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_MASTER-BUKRS,
BDC_FIELD USING 'RF02K-KTOKK' WA_IT_VENDOR_MASTER-KTOKK,
BDC_FIELD USING 'BDC_OKCODE' '/00'.
elseif wa_it_vendor_master-flag = 'C'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_MASTER-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_MASTER-BUKRS,
BDC_FIELD USING 'BDC_OKCODE' '=MALL',
BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-D0110' 'X',
BDC_FIELD USING 'RF02K-D0120' 'X',
BDC_FIELD USING 'RF02K-D0130' 'X',
BDC_FIELD USING 'RF02K-D0210' 'X',
BDC_FIELD USING 'RF02K-D0215' 'X',
BDC_FIELD USING 'RF02K-D0220' 'X',
BDC_FIELD USING 'BDC_OKCODE' '/00'.
endif.
perform :BDC_DYNPRO USING 'SAPMF02K' '0110',
BDC_FIELD USING 'LFA1-ANRED' WA_IT_VENDOR_MASTER-ANRED,
BDC_FIELD USING 'LFA1-NAME1' WA_IT_VENDOR_MASTER-NAME1,
BDC_FIELD USING 'LFA1-NAME2' WA_IT_VENDOR_MASTER-NAME2,
BDC_FIELD USING 'LFA1-SORTL' WA_IT_VENDOR_MASTER-SORTL,
BDC_FIELD USING 'LFA1-STRAS' WA_IT_VENDOR_MASTER-STRAS,
BDC_FIELD USING 'LFA1-ORT01' WA_IT_VENDOR_MASTER-ORT01,
BDC_FIELD USING 'LFA1-PSTLZ' WA_IT_VENDOR_MASTER-PSTLZ,
BDC_FIELD USING 'LFA1-LAND1' WA_IT_VENDOR_MASTER-LAND1,
BDC_FIELD USING 'LFA1-REGIO' WA_IT_VENDOR_MASTER-REGIO,
BDC_FIELD USING 'LFA1-SPRAS' WA_IT_VENDOR_MASTER-SPRAS,
BDC_FIELD USING 'BDC_OKCODE' '/00',
BDC_DYNPRO USING 'SAPMF02K' '0120',
BDC_FIELD USING 'LFA1-VBUND' WA_IT_VENDOR_MASTER-VBUND,
BDC_FIELD USING 'BDC_OKCODE' '/00',
BDC_DYNPRO USING 'SAPMF02K' '0130',
BDC_FIELD USING 'LFBK-BANKS(01)' WA_IT_VENDOR_MASTER-BANKS,
BDC_FIELD USING 'LFBK-BANKL(01)' WA_IT_VENDOR_MASTER-BANKL,
BDC_FIELD USING 'LFBK-BANKN(01)' WA_IT_VENDOR_MASTER-BANKN,
BDC_FIELD USING 'BDC_OKCODE' '=BANK',
BDC_DYNPRO USING 'SAPLBANK' '0100',
BDC_FIELD USING 'BNKA-BANKA' WA_IT_VENDOR_MASTER-BANKA,
BDC_FIELD USING 'BDC_OKCODE' '=ENTR',
BDC_DYNPRO USING 'SAPMF02K' '0130',
BDC_FIELD USING 'BDC_OKCODE' '=ENTR',
BDC_DYNPRO USING 'SAPMF02K' '0210',
BDC_FIELD USING 'LFB1-AKONT' WA_IT_VENDOR_MASTER-AKONT,
BDC_FIELD USING 'LFB1-FDGRV' WA_IT_VENDOR_MASTER-FDGRV,
BDC_FIELD USING 'BDC_OKCODE' '=/00',
BDC_DYNPRO USING 'SAPMF02K' '0215',
BDC_FIELD USING 'LFB1-ZTERM' WA_IT_VENDOR_MASTER-ZTERM,
BDC_FIELD USING 'LFB1-REPRF' WA_IT_VENDOR_MASTER-REPRF,
BDC_FIELD USING 'LFB1-ZWELS' WA_IT_VENDOR_MASTER-ZWELS,
BDC_FIELD USING 'LFB1-XPORE' WA_IT_VENDOR_MASTER-XPORE,
BDC_FIELD USING 'BDC_OKCODE' '=UPDA'.
ENDFORM. " POPULATE_BDC_DATA_VEN_MASTER
*& Form BDC_DYNPRO
This form is used to move data to BDCDATA int'table
FORM BDC_DYNPRO USING PROGRAM TYPE BDC_PROG
DYNPRO TYPE BDC_DYNR.
CLEAR WA_IT_BDCDATA.
WA_IT_BDCDATA-PROGRAM = PROGRAM.
WA_IT_BDCDATA-DYNPRO = DYNPRO.
WA_IT_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_IT_BDCDATA TO IT_BDCDATA.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
This form is used to move data to BDCDATA int'table
FORM BDC_FIELD USING FNAM TYPE ANY
FVAL TYPE ANY.
CLEAR WA_IT_BDCDATA.
WA_IT_BDCDATA-FNAM = FNAM.
WA_IT_BDCDATA-FVAL = FVAL.
APPEND WA_IT_BDCDATA TO IT_BDCDATA.
ENDFORM. " BDC_FIELD
*& Form CALL_TRANSACTION
This form is used to Call FK01 for processing of data either for
Vendor Master or Vendor Extend. The error records are inserted to
Session which can be processed using SM35
FORM CALL_TRANSACTION .
DATA : L_OPTION TYPE CTU_PARAMS,
L_SUBRC TYPE SYSUBRC.
REFRESH IT_MESSTAB.
CLEAR IT_MESSTAB.
L_OPTION-DEFSIZE = 'X'.
L_OPTION-DISMODE = P_MODE.
L_OPTION-UPDMODE = 'S'.
CALL TRANSACTION 'FK01'
USING IT_BDCDATA
MESSAGES INTO IT_MESSTAB
OPTIONS FROM L_OPTION.
L_SUBRC = SY-SUBRC.
IF L_SUBRC = 0.
W_SUCC_REC = W_SUCC_REC + 1.
ELSE.
IF FL_FLAG2 NE 'X'.
PERFORM OPEN_BDC_SESSION.
FL_FLAG2 = 'X'.
ENDIF.
PERFORM BDC_INSERT.
W_ERR_REC = W_ERR_REC + 1.
PERFORM ERROR_RECORD_DATA.
ENDIF.
ENDFORM. " CALL_TRANSACTION
*& Form OPEN_BDC_SESSION
Form used to open session for Error out Records
FORM OPEN_BDC_SESSION .
DATA : L_USERID TYPE APQ_MAPN, " Variable to hold user-id
L_GROUP TYPE APQ_GRPN. " Variable to hold value
MOVE P_GROUP TO L_GROUP.
MOVE SY-UNAME TO L_USERID.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = L_GROUP
KEEP = SPACE
USER = L_USERID
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-008. " Unable to open BDC Session
ENDIF.
ENDFORM. " OPEN_BDC_SESSION
*& Form BDC_INSERT
This form is used to insert error records to a Session method
FORM BDC_INSERT .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FK01'
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-009. " Unable to Insert Data to BDC Session
ENDIF.
ENDFORM. " BDC_INSERT
*& Form ERROR_RECORD_DATA
This form is used to process the messages for the error records which
will be displayed on the output report
FORM ERROR_RECORD_DATA .
DATA : L_LINES TYPE I,
L_MSG(200) TYPE C.
DESCRIBE TABLE IT_MESSTAB LINES L_LINES.
READ TABLE IT_MESSTAB INTO WA_IT_MESSTAB INDEX L_LINES.
IF SY-SUBRC = 0.
CLEAR L_MSG.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = WA_IT_MESSTAB-MSGID
LANG = SY-LANGU
NO = WA_IT_MESSTAB-MSGNR
V1 = WA_IT_MESSTAB-MSGV1
V2 = WA_IT_MESSTAB-MSGV2
V3 = WA_IT_MESSTAB-MSGV3
V4 = WA_IT_MESSTAB-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WA_IT_ERROR_fk01-MSG = L_MSG.
ENDIF.
IF P_VENMAS = 'X'.
WA_IT_ERROR_fk01-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR_fk01-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_ERROR_fk01-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR_fk01-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_ERROR_fk01 TO IT_ERROR_fk01.
CLEAR WA_IT_ERROR_fk01.
ENDIF.
ENDFORM. " ERROR_RECORD_DATA
*& Form CLOSE_BDC_SESSION
Form used to close session of the Error Records
FORM CLOSE_BDC_SESSION .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-010. " Unable to Close BDC Session
ENDIF.
ENDFORM. " CLOSE_BDC_SESSION
*& Form CHK_AND_INS_VENDOR_EXTEND_DATA
This form is used to process BDC data for Vendor Extend
FORM CHK_AND_INS_VENDOR_EXTEND_DATA .
DATA : L_LIFNR TYPE LIFNR.
CLEAR : L_LIFNR, fl_flag4.
sort it_vendor_extend by flag.
LOOP AT IT_VENDOR_EXTEND INTO WA_IT_VENDOR_EXTEND.
W_COUNT = W_COUNT + 1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-REF_LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-REF_LIFNR.
if wa_it_vendor_extend-flag = 'A'.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_EXTEND-REF_LIFNR
AND BUKRS = WA_IT_VENDOR_EXTEND-REF_BUKRS.
IF SY-SUBRC NE 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_EXTEND-REF_LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_EXTEND-REF_BUKRS.
WA_IT_ERROR-MSG = TEXT-007.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-LIFNR.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_EXTEND-LIFNR
AND BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
IF SY-SUBRC EQ 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
WA_IT_ERROR-MSG = TEXT-015.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_EXTEND.
PERFORM CALL_TRANSACTION.
ENDIF.
ENDIF.
CLEAR : WA_IT_VENDOR_EXTEND.
elseif wa_it_vendor_extend-flag = 'C'.
IF FL_FLAG2 = 'X' and fl_flag4 ne 'X'.
PERFORM CLOSE_BDC_SESSION.
fl_flag4 = 'X'.
ENDIF.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_extend.
PERFORM CALL_TRANSACTION_FK02.
CLEAR : WA_IT_VENDOR_EXTEND.
elseif wa_it_vendor_extend-flag = 'N'.
WA_IT_noupdate-LIFNR = WA_IT_VENDOR_extend-LIFNR.
WA_IT_noupdate-BUKRS = WA_IT_VENDOR_extend-BUKRS.
WA_IT_noupdate-MSG = TEXT-019.
APPEND WA_IT_noupdate TO IT_noupdate.
W_noupdate_REC = W_noupdate_REC + 1.
CLEAR : WA_IT_noupdate, WA_IT_VENDOR_EXTEND.
endif.
ENDLOOP.
IF FL_FLAG2 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
if fl_flag3 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
ENDFORM. " CHK_AND_INS_VENDOR_EXTEND_DATA
*& Form POPULATE_BDC_DATA_VEN_EXTEND
This form is used to populate BDC data of Vendor Extend
FORM POPULATE_BDC_DATA_VEN_EXTEND .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-ZTERM
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-ZTERM.
IF WA_IT_VENDOR_EXTEND-REPRF = 'Y'.
WA_IT_VENDOR_EXTEND-REPRF = 'X'.
ENDIF.
IF WA_IT_VENDOR_extend-XPORE = 'Y'.
WA_IT_VENDOR_extend-XPORE = 'X'.
ENDIF.
if wa_it_vendor_extend-flag = 'A'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0105',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_EXTEND-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_EXTEND-BUKRS,
BDC_FIELD USING 'RF02K-KTOKK' WA_IT_VENDOR_EXTEND-KTOKK,
BDC_FIELD USING 'RF02K-REF_LIFNR'
WA_IT_VENDOR_EXTEND-REF_LIFNR,
BDC_FIELD USING 'RF02K-REF_BUKRS'
WA_IT_VENDOR_EXTEND-REF_BUKRS,
BDC_FIELD USING 'BDC_OKCODE' '/00'.
elseif wa_it_vendor_extend-flag = 'C'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_extend-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_extend-BUKRS,
BDC_FIELD USING 'RF02K-D0210' 'X',
BDC_FIELD USING 'RF02K-D0215' 'X',
BDC_FIELD USING 'BDC_OKCODE' '/00'.
endif.
perform :BDC_DYNPRO USING 'SAPMF02K' '0210',
BDC_FIELD USING 'LFB1-AKONT' WA_IT_VENDOR_EXTEND-AKONT,
BDC_FIELD USING 'LFB1-FDGRV' WA_IT_VENDOR_EXTEND-FDGRV,
BDC_FIELD USING 'BDC_OKCODE' '=/00',
BDC_DYNPRO USING 'SAPMF02K' '0215',
BDC_FIELD USING 'LFB1-ZTERM' WA_IT_VENDOR_EXTEND-ZTERM,
BDC_FIELD USING 'LFB1-REPRF' WA_IT_VENDOR_EXTEND-REPRF,
BDC_FIELD USING 'LFB1-ZWELS' WA_IT_VENDOR_EXTEND-ZWELS,
BDC_FIELD USING 'LFB1-XPORE' WA_IT_VENDOR_extend-XPORE,
BDC_FIELD USING 'BDC_OKCODE' '=UPDA'.
ENDFORM. " POPULATE_BDC_DATA_VEN_EXTEND
*& Form DISPLAY_ERROR_REPORT
This form is used to display the error records on the output screen
FORM DISPLAY_ERROR_REPORT .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O05. " Error List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O06. " Error List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H03, " Error Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_ERROR INTO WA_IT_ERROR.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_ERROR-LIFNR,
17 SY-VLINE,
18 WA_IT_ERROR-BUKRS,
31 SY-VLINE,
32 WA_IT_ERROR-MSG,
100 SY-VLINE.
CLEAR : WA_IT_ERROR.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
ENDFORM. " DISPLAY_ERROR_REPORT
*& Form CALL_TRANSACTION_FK02
Form used to Call Transaction FK02
form CALL_TRANSACTION_FK02 .
DATA : L_OPTION TYPE CTU_PARAMS,
L_SUBRC TYPE SYSUBRC.
REFRESH IT_MESSTAB.
CLEAR IT_MESSTAB.
L_OPTION-DEFSIZE = 'X'.
L_OPTION-DISMODE = P_MODE.
L_OPTION-UPDMODE = 'S'.
CALL TRANSACTION 'FK02'
USING IT_BDCDATA
MESSAGES INTO IT_MESSTAB
OPTIONS FROM L_OPTION.
L_SUBRC = SY-SUBRC.
IF L_SUBRC = 0.
W_SUCC_REC1 = W_SUCC_REC1 + 1.
WA_IT_succ_rec1-MSG = Text-017.
IF P_VENMAS = 'X'.
WA_IT_succ_rec1-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_succ_rec1-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_succ_rec1-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_succ_rec1-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_succ_rec1 TO IT_succ_rec1.
ELSE.
IF FL_FLAG3 NE 'X'.
PERFORM OPEN_BDC_SESSION_fk02.
FL_FLAG3 = 'X'.
ENDIF.
PERFORM BDC_INSERT_fk02.
W_ERR_REC = W_ERR_REC + 1.
PERFORM ERROR_RECORD_DATA1.
ENDIF.
endform. " CALL_TRANSACTION_FK02
*& Form OPEN_BDC_SESSION_fk02
Form used to Open session for FK02
form OPEN_BDC_SESSION_fk02 .
DATA : L_USERID TYPE APQ_MAPN, " Variable to hold user-id
L_GROUP TYPE APQ_GRPN. " Variable to hold value
MOVE P_GROUP1 TO L_GROUP.
MOVE SY-UNAME TO L_USERID.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = L_GROUP
KEEP = SPACE
USER = L_USERID
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-008. " Unable to open BDC Session
ENDIF.
endform. " OPEN_BDC_SESSION_fk02
*& Form BDC_INSERT_fk02
Form used to insert data into BDC session using FK02
form BDC_INSERT_fk02 .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FK02'
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-009. " Unable to Insert Data to BDC Session
ENDIF.
endform. " BDC_INSERT_fk02
*& Form display_changed_report
Form to display Updated Vendor data
form display_changed_report .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O10. " Updated List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O11. " Updated List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_succ_rec1 INTO WA_IT_succ_rec1.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_succ_rec1-LIFNR,
17 SY-VLINE,
18 WA_IT_succ_rec1-BUKRS,
31 SY-VLINE,
32 WA_IT_succ_rec1-MSG,
100 SY-VLINE.
CLEAR : WA_IT_succ_rec1.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_changed_report
*& Form display_nochange_report
Form to display No Changed data for Vendors
form display_nochange_report .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O12. " No Changes List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O13. " No Changes List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_noupdate INTO WA_IT_noupdate.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_noupdate-LIFNR,
17 SY-VLINE,
18 WA_IT_noupdate-BUKRS,
31 SY-VLINE,
32 WA_IT_noupdate-MSG,
100 SY-VLINE.
CLEAR : WA_IT_noupdate.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_nochange_report
*& Form ERROR_RECORD_DATA1
Form to get Error Message for Changed Vendors
form ERROR_RECORD_DATA1 .
DATA : L_LINES TYPE I,
L_MSG(200) TYPE C.
DESCRIBE TABLE IT_MESSTAB LINES L_LINES.
READ TABLE IT_MESSTAB INTO WA_IT_MESSTAB INDEX L_LINES.
IF SY-SUBRC = 0.
CLEAR L_MSG.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = WA_IT_MESSTAB-MSGID
LANG = SY-LANGU
NO = WA_IT_MESSTAB-MSGNR
V1 = WA_IT_MESSTAB-MSGV1
V2 = WA_IT_MESSTAB-MSGV2
V3 = WA_IT_MESSTAB-MSGV3
V4 = WA_IT_MESSTAB-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WA_IT_ERROR_fk02-MSG = L_MSG.
ENDIF.
IF P_VENMAS = 'X'.
WA_IT_ERROR_fk02-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR_fk02-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_ERROR_fk02-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR_fk02-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_ERROR_fk02 TO IT_ERROR_fk02.
CLEAR WA_IT_ERROR_fk02.
ENDIF.
endform. " ERROR_RECORD_DATA1
*& Form display_error_report_fk01
Form to display Error Report for Master Vendors (FK01)
form display_error_report_fk01 .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O05. " Error List for Vendor Master (FK01)
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O06. " Error List for Vendor Master Extended (FK01)
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_ERROR_fk01 INTO WA_IT_ERROR_fk01.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_ERROR_fk01-LIFNR,
17 SY-VLINE,
18 WA_IT_ERROR_fk01-BUKRS,
31 SY-VLINE,
32 WA_IT_ERROR_fk01-MSG,
100 SY-VLINE.
CLEAR : WA_IT_ERROR_fk01.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_error_report_fk01
*& Form display_error_report_fk02
Form to display Error Report for changed Vendors (FK02)
form display_error_report_fk02 .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O14. " Error List for Vendor Master (FK02)
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O15. " Error List for Vendor Master Extended (FK02)
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number -
Error in reading workflow container data and populate it in web dynpro pd
Hi,
Please advise on the following issue.
I have an adobe interactive form built inside a webdynpro java application, on a RFC call this form is sent as an xstring and the BAPI triggers a workflow in the backend. At any point of time, on passing a workitem id, a custom function module returns the form data that exists in the workflow as an xstring back to webdynpro java. This xstring is passed back to the webdynpro java application so that the contents can be displayed in a pdf.
I assume that since the data source context structure which has to be populated with this wf container form data is exactly the same as the one which generated this pdf in webdynpro java before the workflow trigger, the WDINTERACTIVEFORMHELPER.transer.... method should be sufficient to re-populate the wd java based pdf with wf container data.
But I am unable to do this as I am getting "PDFDocument processor failed to process input pdf request" at this step. Though I can see that the RFC is returning the binary data
Versions : ALD 8.1, CE 7.1 SP5 NWDS, Adobe reader 9
Awaiting your inputs.
Thanks
LishaHi Hari,
Why do you use a FM to read the container? You couldn't use bindings? Or are you reading the container of the workflow in a separate program?
Are you sure the container element is filled when the workflow is started? If so how is it filled, in the event binding?
Regards,
Martin -
Getting at POST data from a pl/sql procedure through Path Aliasing
Hi.
I have mod_plsql configured with "path alias" and "path alias procedure" so that the request ends up in my
procedure and i have the remaining path in p_path. This is what I want.
http://<domain>/<dad>/<myalias>/<p_path>
My question is; is there a way at this point to get at POST data in the request? I haven't been able to find
any way of doing this looking through the documentation. Is the body of the request lost at the gateway
(mod_plsql) using path alias?
If so, is there some other way to achieve something like !myproc(name_array [somearr], value_arr [somearr])
where the first entry in the arrays is an eqvivalent to p_path?Billy Verreynne wrote:
Øyle wrote:
I have mod_plsql configured with "path alias" and "path alias procedure" so that the request ends up in my
procedure and i have the remaining path in p_path. This is what I want.
http://<domain>/<dad>/<myalias>/<p_path>
My question is; is there a way at this point to get at POST data in the request? Do not understand the question as a POST and GET are simply two different methods that a web browser submits a URL and data. There is no "+path+" involved here.Thank you for answering. I think the confusion is because you disregard what I said about "path alias" and "path alias procedure".
Those are configuration of the mod_plsql gateway so that any URI containing <myalias> above is directed to the procedure stated
by "path alias procedure". The gateway also sends any remaining parts of the URI to this procedure as an varchar2 argument (p_path).
My problem is that I see no way to get at any POST data as the signature of this procedure has to be this one varchar2, and I don't
know any other way to get at the body of the request.
>
If so, is there some other way to achieve something like !myproc(name_array [somearr], value_arr [somearr])
where the first entry in the arrays is an eqvivalent to p_path?If you want to know what the URL is, the full path used, then you need to look at the CGI (Command Gateway Interface) environment. The web server builds a list of CGI variables. These include the type of web server, the URL, the type of HTTP command (GET or POST), and so on.
Within your PL/SQL web procedure, you can query these CGI variables. Have a look at the function OWA_UTIL.GET_CGI_ENV in the [Oracle® Database PL/SQL Packages and Types Reference|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/w_util.htm#i997269] guide.
Take a look at CGI variables such as PATH_INFO, PATH_TRANSLATED, SCRIPT_NAME and so on.Yes, thank you, but my problem is a bit upside down. I do use the cgi environment to get the method and I have path as input, what I can't
find is the body of the request. I might be approaching this entirely the wrong way. It might be a bit easyer to understand if I state that I'm
trying to find a way to implement a RESTfull service in pl/sql. -
How to get current row data in table control
Hi , expert ,
I am professional in oracle , but now I am a new guy in SAP ABAP .
I have a question in UI
How to get current row data and click pushbutton in table control to open next screen ?
I want to get the current data and open next screen to carry out detail detail .
Thansk for all your suggestion .GET CURSOR LINE SY-CUROW .
READ TABLE internal_table index SY-CUROW. -
Short dump Error during VM container communication between ABAP and JAVA.
Hello All,
Can anybody please help with resolving the following issue:
Short dump is displayed, when I try to insert CRM product (type: material) in the document (opportunity). This CRM product was created in CRM directly.
When I try to insert ECC migrated material, everything works fine.
Here is the details of dump:
Short text
Error during VM container communication between ABAP and JAVA
Information on where terminated
Termination occurred in the ABAP program "SAPLPRC_INT" - in "GET_PRICING_PROCEDURE_INFO".
The main program was "SAPMHTTP ". In the source code you have the termination point in line 100 of the (Include) program "LPRC_INTF35".
Thank you!hi Willie,
this is the dump, and i have used the t-code sm52 . the VMC is not active.
|Short Text |
| Error during VM Container communication between ABAP and JAVA. |
|What happened? |
| The current program had to be terminated because of an |
| error when installing the R/3 System. |
| Error in the RFC layer. |
|What can you do? |
| Note which actions and entries caused the error to occur. |
| |
| Consult your SAP administrator. |
| |
| Using transaction ST22 for ABAP dump analysis, you can view, manage, |
| and retain termination messages for longer periods. |
|Error analysis |
| An error has occurred in the RFC layer during communication between |
| JAVA and the ABAP stack. This prevents data from being passed correctly |
| between the two stacks. |
| |
| Message = TH_VMC_SERV_NOT_ACTIVE |
| Return code = -1007 |
| Pointer = "000007DD348F6138" |
|How to correct the error |
| Check whether the VMC is active on your application server. To do this, |
| run transaction SM52. If the VMC is not active, contact your SAP |
| administrator. |
Regards
Charles
Maybe you are looking for
-
Verification code for e-mail address
I have changed e-mail address for the service Share picture using e-mail attachment in Photoshop Elements 11. This should be confirmed by Adobe sending me an e-mail stating the verification code but no code received. What should I do? Without verifi
-
hi, i m quite new to java . Can u pls tell me the mistakes in the following programme in BlueJ (to get the day on the given date. //reference date=31 Dec 0000 Friday class datedays{ static String d;static int t;static int n2; public static void enter
-
Hello Friends, When I am doing a Goods Receipt, system is giving the message " Maintain number range object for object J_1IRG23A1, year 2008, excise group 50". What to do for this. Please tell me. Regards, nr
-
ADF Deployment Granularity - Best Practices
Hi People, If anyone can spare some time to discuss this, I would like some pointers about ADF applications deployment best practices. For example, we have some customers that complain about having to re-deploy the entire application EAR just to add
-
I have CS5 design standard, can I still get traditional dvd upgrade to CS6 design standard?