Structure of SAP Master Tables
Hi All,
Could anyone of you indicate what are the advantages and disadvantages of modifying the structure of SAP Master Tables. Is this recommend it?
Is there any white paper or document explain it?
Any help you can provide it is greatly appreciated.
Thanks
Edgardo
Hello Edgardo,
Now you have the answer for this.
Suppose we change the structure of a master table like we add a new field for example . How all the reports,scriptts, forms,module pools etc etc take care of this?
Are we going to modify each and every reports,forms etc?
Of course it is possible to modify any table, if not from sap then from SQL but how to take care of the relationships which it bears with other objects?
Search for documents on th efollowing link
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_library&query=mastertablechange&adv=false&sortby=cm_rnd_rankvalue
Pl dont forget to award suitably.
Regards
Similar Messages
-
How and where does SAP standard programs update the master tables...
Hello there,
How and where does SAP standard programs update the master tables...
to be precise.. if a (any) transaction occurs the programs behind it holds the data in temporary structures.
where and when does it get updated in the master table.
can anyone tell me how it happens?
I Know that from the where used list one can find the corresponding table but most of the time it wont suffice
I am expecting a proper answer.
Santosh BHello Santosh,
you need to do some self-reading on the following topic
Updates in the SAP System (BC-CST-UP)
http://help.sap.com/saphelp_47x200/helpdata/en/e5/de86e135cd11d3acb00000e83539c3/frameset.htm
Regards,
Siddhesh -
BI 7 : Command to export a table structure of SAP R/3 into a script/text ?
Hi All.
Greetings.
Am New to SAP R/3 system. And request help.
We are trying to pull data from SAP R/3 thro Bussiness Objects Data Services into Oracle.
For now : we create a target oracle table looking at the table structure of SAP R/3 from SE 11.
In BODS, We then do the query transformation, and use the oracle target table created by us manually.
This works absolutely fine.
We would like to know the command by which we could export the table structure of any existing table
in SAP R/3 into a script / or to text file,
which we could use to create the same table structure in oracle.
Rather than manually typing some 200 field names for each tables.
Can anyone advise on this.
Thanks
InduHello,
The problem is caused due to the spaces in your directories
C:\SAP Dumps\Core Release SR1 Export_CD1_51019634/DB/ADA/DBSIZE.XML
Replace the spaces with underscores and restart the installation from from scratch.
Cheers
Bert -
How to create and add table type to a DDIC Structure in sap 3.1H
How to create and add table type to a DDIC Structure in sap 3.1H
How to create and add table type to a DDIC Structure in sap 3.1H
-
Sap master data , differnt organization structure
Sir,
What are the different organization structure of SAP(Inbuilt), so that we can use in different scenarious. like company code, sales organization, etc
Thanks and Regards
KamalHello,
Welcome to SDN,
If you have access to SAP system or IDES.
Then if you want know which existing org structure can be used in system then,
There is two way:
- Checking existing org structure in use through accessing Table VBAK (TCode SE16).
OR
- if its a fresh IDES then
use TCode EC01.
click on Structure Button on organizational object company code screen.
click on Navigation Button organizational structure for company code screen
Accept the message
Double click on standard Company code 0001 or 1000.
I hope this can assist you.
All the best.
Keep learning and enjoy.
Thanks & Regards
JP -
Hi,
Can any one please let me know the standard SAP user table.
Regards,
lakshmi.USR01 -- User master record (runtime data)
USR02 -- Logon Data (Kernel-Side Use)
USR03 -- User address data
USR04 -- User master authorizations
USR05 -- User Master Parameter ID
USR06 -- Additional Data per User
Reward Points if useful. -
Help on Updating master table using SAP NetWeaver 2004s
Dear BSP ians,
I need to edit,modify multiple records and has to be updated in the master table using MVC. We are using SAP NetWeaver 2004s.
We have gone through the sample codings which is present in the forum already, and we have worked out using Pages with Flow Logic on ECC 6.0 and those are not getting exexcuted for "SAP NetWeaver 2004s".
Help me in this issue.
Points will be rewarded for helpful infos.
Gokul.NMy issue is, the sample codes present alreaady in the forums works in ECC 6.0
But we are using "SAP Netweaver 2004s" -
How to access the ORACLE APPS table structures from SAP
Hi Experts,
How to access the ORACLE APPS table structures from SAP? Is it possible from SAP?
Thanks in advance
ThomasHi Silviya,
you can access this database using a technique called DB Multiconnect - sometimes written as multi-connect.
Search the SAP documentation and notes for this term and you will find how to do it.
Essentially you configure the remote database connection via transaction DBCON.
If your SAP system is not running on Oracle you will need to install the db-specific kernel files for Oracle along with the Oracel db client software - SQL*Net.
Then you can access the Oracle database from ABAP using native-SQL. It works a treat!
Cheers
Graham Robbo -
Reg: Modification of Master Tables using BDC/BAPI
Dear All,
Thanks for Support shown from all of you.
I want the detailed procedure for Modifying the existing data in the Master Tables using BDC's / BAPI's and Dialog programming.
Please send me one example code.
Please Help me Out.
Thanks In Advance.
Regards,
Adinarayana.Bbapi example
REPORT ZMMR_DELETEPO NO STANDARD PAGE HEADING MESSAGE-ID zisb.
tables : zvtls_sap.
*C-- Types Declarations
TYPES : BEGIN OF tp_flatfile_vtls,
ebeln(10),
ebelp type ekpo-ebelp,
END OF tp_flatfile_vtls.
*=====================================================================
INTERNAL TABLES DECLARATION
*=====================================================================
DATA: t_flatfile_vtls TYPE tp_flatfile_vtls OCCURS 0 WITH HEADER LINE.
data : begin of t_sapdata occurs 0,
po like zvtls_sap-posap,
item like zvtls_sap-itemsap,
end of t_sapdata.
data : begin of t_flatfile_vtls1 occurs 0,
po(10),
item like zvtls_sap-itemsap,
end of t_flatfile_vtls1.
data : begin of t_update occurs 0,
mandt like zvtls_sap-mandt,
povtls like zvtls_sap-povtls,
itemvtls like zvtls_sap-itemvtls,
posap like zvtls_sap-posap,
itemsap like zvtls_sap-itemsap,
aedat like zvtls_sap-aedat,
paedt like zvtls_sap-paedt,
loekz like zvtls_sap-loekz,
end of t_update.
data : begin of t_poheader occurs 0,
po like zvtls_sap-posap,
end of t_poheader.
data : begin of t_poitem occurs 0,
po like zvtls_sap-posap,
item like zvtls_sap-itemsap,
end of t_poitem.
DATA : BEGIN OF T_MESSAGE OCCURS 0,
MSGTY,
MSGID(2),
MSGNO(3),
MSGTX(100),
PO like zvtls_sap-povtls,
item like zvtls_sap-itemvtls,
END OF T_MESSAGE.
DATA : BEGIN OF t_bapi_poheader OCCURS 0.
INCLUDE STRUCTURE bapimepoheader.
DATA : END OF t_bapi_poheader.
DATA : BEGIN OF t_bapi_poheaderx OCCURS 0.
INCLUDE STRUCTURE bapimepoheaderx.
DATA : END OF t_bapi_poheaderx.
DATA : BEGIN OF t_bapi_poitem OCCURS 0.
INCLUDE STRUCTURE bapimepoitem.
DATA : END OF t_bapi_poitem.
DATA : BEGIN OF t_bapi_poitemx OCCURS 0.
INCLUDE STRUCTURE bapimepoitemx.
DATA : END OF t_bapi_poitemx.
DATA : BEGIN OF t_bapireturn OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA : END OF t_bapireturn.
*=====================================================================
V A R I A B L E S
*=====================================================================
DATA: w_success(6) TYPE n,
w_bklas like t023-bklas,
w_curryear(4),
w_begda like sy-datum,
w_endda like sy-datum,
w_begyr(4),
w_endyr(4),
w_currmon(2),
w_assetclass like ankt-anlkl,
w_price type p,
w_recordsap type i,
w_povtls(10),
w_count type i.
DATA: w_filepath TYPE rlgrap-filename,
w_rc TYPE sy-subrc,
w_sscrfields_ucomm1 TYPE sscrfields-ucomm,
w_file1 TYPE string,
w_file2 TYPE FILENAME-FILEINTERN.
*=====================================================================
C O N S T A N T S
*=====================================================================
CONSTANTS: c_x TYPE c VALUE 'X',
c_hyp TYPE c VALUE '-',
c_err TYPE bdc_mart VALUE 'E'.
CONSTANTS: c_slash(1) TYPE c VALUE '/',
c_hash(1) TYPE c VALUE '#',
c_pipe TYPE c VALUE '|',
c_1 TYPE i VALUE 1,
c_zero TYPE n VALUE '0',
c_rg1(3) TYPE c VALUE 'rg1',
c_gr3(3) TYPE c VALUE 'GR3',
c_gr2(3) TYPE c VALUE 'GR2',
c_e(1) TYPE c VALUE 'E',
c_filepath(8) TYPE c VALUE '/interf/',
c_filetype(10) TYPE c VALUE 'ASC'.
CONSTANTS : c_bapimepoheaderx TYPE x030l-tabname
VALUE 'bapimepoheaderx',
c_bapimepoitem TYPE x030l-tabname
VALUE 'bapimepoitem',
c_bapimepoaccount TYPE x030l-tabname
VALUE 'bapimepoaccount',
c_t_bapi_poheader(15) TYPE c
VALUE 't_bapi_poheader',
c_t_bapi_poitem(13) TYPE c
VALUE 't_bapi_poitem',
c_t_bapi_poitemx(14) TYPE c
VALUE 't_bapi_poitemx',
c_t_bapi_poheaderx(16) TYPE c
VALUE 't_bapi_poheaderx'.
CLASS cl_abap_char_utilities DEFINITION LOAD.
CONSTANTS:con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
*======================================================================
SELECTION SCREEN
*======================================================================
SELECTION-SCREEN BEGIN OF BLOCK inputpath WITH FRAME TITLE text-001.
SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETERS : p_fore RADIOBUTTON GROUP rg1
USER-COMMAND pc,
p_back RADIOBUTTON GROUP rg1 DEFAULT 'X'.
SELECTION-SCREEN : END OF BLOCK blk2.
SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-003.
PARAMETERS : p_file1 LIKE rlgrap-filename OBLIGATORY MODIF ID gr2.
PARAMETERS : p_afile1 LIKE rlgrap-filename OBLIGATORY MODIF ID gr3.
SELECTION-SCREEN : END OF BLOCK blk1.
SELECTION-SCREEN END OF BLOCK inputpath.
*C-- Initialization Event
INITIALIZATION.
CLEAR w_filepath.
CONCATENATE c_filepath sy-sysid c_slash sy-mandt c_slash INTO
w_filepath.
CONDENSE w_filepath NO-GAPS.
p_file1 = text-008.
p_afile1 = text-009.
*======================================================================
SELECTION SCREEN EVENTS
*======================================================================
*C-- Selection Screen Output
AT SELECTION-SCREEN OUTPUT.
IF p_fore = c_x.
w_sscrfields_ucomm1 = space.
ELSE.
w_sscrfields_ucomm1 = c_rg1.
ENDIF.
LOOP AT SCREEN.
*C--Modify selection screen if presentation
*C--or application server radio button is chosen
IF w_sscrfields_ucomm1 = space.
IF screen-group1 = c_gr3.
screen-active = c_zero.
ENDIF.
ELSE.
IF screen-group1 = c_gr2.
screen-active = c_zero.
ENDIF.
ENDIF.
if screen-name = 'P_AFILE1'.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
*C-- Selection Screen VALUE-REQUEST FOR File path
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
IF p_fore EQ c_x.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file1.
ENDIF.
*C-- At Start of the Selection Process
START-OF-SELECTION.
IF p_fore EQ c_x.
w_file1 = p_file1.
ELSE.
w_file2 = p_afile1.
ENDIF.
IF p_fore EQ c_x. " Presentaion Server
*C--Validations for the input files
PERFORM validate_pre_file USING p_file1.
*C-- Load the contents of the input file into the internal table
PERFORM upload_file TABLES t_flatfile_vtls
USING w_file1
CHANGING w_rc.
IF w_rc <> 0.
MESSAGE s006 DISPLAY LIKE c_e.
ENDIF.
ELSE. " Application Server
*C--Validations for the input files
PERFORM validate_app_file USING w_file2.
*C-- Load the contents of the input file into the internal table
PERFORM upload_file_app TABLES t_flatfile_vtls
USING w_file2
CHANGING w_rc.
ENDIF.
loop at t_flatfile_vtls.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = t_flatfile_vtls-ebeln
IMPORTING
output = t_flatfile_vtls1-po.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = t_flatfile_vtls-ebelp
IMPORTING
output = t_flatfile_vtls1-item.
append t_flatfile_vtls1.
clear t_flatfile_vtls1.
endloop.
perform get_podata.
loop at t_poheader.
perform move_to_bapi.
perform call_bapi.
endloop.
PERFORM STORE_MESSAGES TABLES T_MESSAGE.
*& Form validate_pre_file
Routine to validate presentation server file path.
-->fp_name text
FORM validate_pre_file USING fp_name TYPE rlgrap-filename.
DATA : l_result,
l_filename TYPE string.
l_filename = fp_name.
CLEAR l_result.
CALL METHOD cl_gui_frontend_services=>file_exist
EXPORTING
file = l_filename
RECEIVING
result = l_result
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE s007 DISPLAY LIKE c_e.
LEAVE LIST-PROCESSING.
ELSEIF l_result IS INITIAL.
MESSAGE s008 DISPLAY LIKE c_e.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " validate_pre_file_hdr
*& Form validate_app_file
text - Checks if the path entered and filename is correct
FORM validate_app_file USING fp_file TYPE FILENAME-FILEINTERN.
data : l_fname(60).
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = FP_FILE
OPERATING_SYSTEM = SY-OPSYS
IMPORTING
FILE_NAME = L_FNAME
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = '0'.
OPEN DATASET L_FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
MESSAGE s007 DISPLAY LIKE c_e.
ELSE.
CLOSE DATASET l_fname.
ENDIF.
ENDIF.
ENDFORM. " validate_app_file
*& Form upload_file
Routine to upload data from file to tables.
-->P_fp_flatfile
-->P_fp_file
<--P_fp_rc
FORM upload_file TABLES fp_flatfile
USING fp_file TYPE string
CHANGING fp_rc TYPE sy-subrc.
IF fp_flatfile[] IS INITIAL.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = fp_file
filetype = c_filetype
has_field_separator = c_x
TABLES
data_tab = fp_flatfile
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.
MOVE sy-subrc TO fp_rc.
ENDIF.
ENDFORM. " upload_file
*& Form upload_file_app
text
-->FP_FLATFILEtext
-->FP_FILE text
-->FP_RC text
FORM upload_file_app TABLES fp_flatfile
USING fp_file TYPE FILENAME-FILEINTERN
CHANGING fp_rc TYPE sy-subrc.
DATA: l_string TYPE tedata-data.
DATA: wa_data_file TYPE tp_flatfile_vtls,
l_wllength TYPE i,
FNAME(60).
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = FP_FILE
OPERATING_SYSTEM = SY-OPSYS
IMPORTING
FILE_NAME = FNAME
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
OPEN DATASET FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
*C-- commented by Bikash
MESSAGE s107(yaero_ps) DISPLAY LIKE c_e.
message e008.
ELSE.
DO.
CLEAR: l_string.
READ DATASET FNAME INTO l_string LENGTH l_wllength.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT l_string AT con_tab INTO wa_data_file-ebeln
wa_data_file-ebelp.
APPEND wa_data_file TO fp_flatfile.
ENDIF.
ENDDO.
CLOSE DATASET FNAME.
ENDIF.
ENDIF.
ENDFORM. " upload_file_app
*& Form get_podata
text
form get_podata.
select *
into table t_update
from zvtls_sap
for all entries in t_flatfile_vtls1
where itemvtls = t_flatfile_vtls1-item
and povtls = t_flatfile_vtls1-po.
sort t_update by posap itemsap.
loop at t_update.
at new posap.
t_poheader-po = t_update-posap.
append t_poheader.
clear t_poheader.
endat.
t_poitem-po = t_update-posap.
t_poitem-item = t_update-itemsap.
append t_poitem.
clear t_poitem.
t_update-paedt = sy-datum.
t_update-loekz = 'X'.
modify t_update.
endloop.
modify zvtls_sap from table t_update.
endform. "get_podata
*& Form move_to_bapi
text
form move_to_bapi.
t_bapi_poheader-po_number = t_poheader-po.
CLEAR t_bapi_poheaderx.
PERFORM fill_check_structure USING c_bapimepoheaderx
c_t_bapi_poheader
c_t_bapi_poheaderx
c_x.
refresh : t_bapi_poitem,t_bapi_poitemx.
loop at t_poitem where po = t_poheader-po.
clear t_bapi_poitem.
t_bapi_poitem-po_item = t_poitem-item.
t_bapi_poitem-delete_ind = 'X'.
CLEAR t_bapi_poitemx.
PERFORM fill_check_structure USING c_bapimepoitem
c_t_bapi_poitem
c_t_bapi_poitemx
c_x.
t_bapi_poitemx-po_item = t_poitem-item.
t_bapi_poitemx-po_itemx = c_x.
APPEND t_bapi_poitem.
APPEND t_bapi_poitemx.
clear t_bapi_poitem.
clear t_bapi_poitemx.
endloop.
endform. "move_to_bapi
*& Form call_bapi
This form Routine is used to commit the data records
FORM call_bapi .
DATA : l_msgty TYPE c,
l_msgid(2) TYPE c,
l_msgno(3) TYPE c,
l_msgtx(100) TYPE c,
l_errflag TYPE c.
CLEAR: t_bapireturn.
REFRESH: t_bapireturn.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = T_POHEADER-PO
POHEADER = T_BAPI_POHEADER
POHEADERX = T_BAPI_POHEADERX
TABLES
RETURN = T_BAPIRETURN
POITEM = T_BAPI_POITEM
POITEMX = T_BAPI_POITEMX.
READ TABLE t_bapireturn WITH KEY type = c_err TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
ENDIF.
*C-- Write messages
WRITE: / 'PO Number', t_poheader-po.
clear : t_update,w_povtls.
read table t_update with key posap = t_poheader-po.
w_povtls = t_update-povtls.
CLEAR l_errflag.
LOOP AT t_bapireturn.
CLEAR: l_msgty, l_msgid, l_msgno, l_msgtx.
l_msgty = t_bapireturn-type.
l_msgid = t_bapireturn-id.
l_msgno = t_bapireturn-number.
l_msgtx = t_bapireturn-message.
WRITE: / l_msgty, l_msgid, l_msgno, l_msgtx.
if l_msgtx cs t_poheader-po.
w_count = w_count + 1.
loop at t_update.
if sy-tabix = w_count.
t_message-item = t_update-itemvtls.
endif.
endloop.
endif.
t_message-msgty = l_msgty.
t_message-msgid = l_msgid.
t_message-msgno = l_msgno.
t_message-msgtx = l_msgtx.
t_message-po = w_povtls.
append t_message.
clear t_message.
IF l_msgty EQ c_err.
l_errflag = c_x.
ENDIF. " l_msgty EQ 'E'
ENDLOOP.
ULINE.
IF l_errflag NE c_x.
w_success = w_success + 1.
ENDIF. " l_errflag NE C_X
endform. "call_bapi
*& Form fill_check_structure
This form Routine will check whether the specified structure
exist/active
FORM fill_check_structure USING fp_tabname TYPE any
fp_orgtabname TYPE any
fp_chktabname TYPE any
fp_check TYPE c.
FIELD-SYMBOLS : <fs_chk>, <fs_org>.
DATA: l_char1(61) TYPE c,
l_char2(61) TYPE c.
DATA: BEGIN OF tl_nametab OCCURS 60.
INCLUDE STRUCTURE x031l.
DATA: END OF tl_nametab.
REFRESH tl_nametab.
CALL FUNCTION 'RFC_GET_NAMETAB'
EXPORTING
tabname = fp_tabname
TABLES
nametab = tl_nametab
EXCEPTIONS
table_not_active = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR tl_nametab.
ENDIF.
LOOP AT tl_nametab.
CLEAR: l_char1, l_char2.
CONCATENATE fp_chktabname c_hyp tl_nametab-fieldname INTO l_char1.
ASSIGN (l_char1) TO <fs_chk>.
CONCATENATE fp_orgtabname c_hyp tl_nametab-fieldname INTO l_char2.
ASSIGN (l_char2) TO <fs_org>.
IF <fs_org> IS NOT INITIAL.
<fs_chk> = fp_check.
ENDIF.
ENDLOOP.
ENDFORM. " fill_check_structure
*& Form STORE_MESSAGES
text
-->FP_MESSAGEStext
FORM STORE_MESSAGES TABLES FP_MESSAGES STRUCTURE T_MESSAGE.
DATA: wl_output_data LIKE t_MESSAGE.
DATA: l_catstr TYPE string.
DATA: l_fieldvalue TYPE string.
DATA: l_index TYPE i VALUE 1.
DATA: L_FNAME(60).
FIELD-SYMBOLS <fs>.
CLEAR l_catstr.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = '/USR/SAP/VTLS/POCHANGE/LOG'
OPERATING_SYSTEM = SY-OPSYS
IMPORTING
FILE_NAME = L_FNAME
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = '0'.
IF fp_messages[] IS NOT INITIAL.
OPEN DATASET L_FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
LEAVE LIST-PROCESSING.
ELSE.
LOOP AT fp_messages INTO wl_output_data.
DO.
ASSIGN COMPONENT l_index OF STRUCTURE wl_output_data TO <fs>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
MOVE <fs> TO l_fieldvalue.
IF l_catstr IS NOT INITIAL.
CONCATENATE l_catstr l_fieldvalue INTO l_catstr SEPARATED
BY con_tab.
ELSE.
MOVE l_fieldvalue TO l_catstr.
ENDIF.
l_index = l_index + c_1.
CLEAR l_fieldvalue.
CLEAR <fs>.
ENDDO.
l_index = c_1.
TRANSFER l_catstr TO L_FNAME .
CLEAR wl_output_data.
CLEAR l_catstr.
ENDLOOP.
CLOSE DATASET L_FNAME.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "STORE_MESSAGES -
Where do I find the inventory master table?
I need to search our inventory by keyword and since SAP doesn't have this capability I'd like to write a basic SQL query to find the items I'm looking for. So where do I find the inventory master table? I found the table INV1 but it only has 274 records and we have tens of thousands of inventory items in the system. I've searched Google for the databasee structure and found it but every reference to it I can find doesn't have the same tables we do. We're running SAP Business One 2007a.
Thanks!Hi,
The inventory table is OITM
one tip though is to go to the tools menu in SAP and select System Information.
You can then hover over the item master data screen and in the bottom right hand corner it will tell you not only the table name but also the field name you are hovering over.
Please note, if you log out of SAP, the next time you log in you will have to turn system information back on again.
Regards,
Adrian -
Cost center (KOSTL) is not updating in HR master table for infotype 0001
Hi ABAP gurus,
We have one interface where we are posting the HR master data using the IDOC (IDOC_INPUT_HRMD) into SAP.
While updating cost center, We have one issue regarding infotype 0001.
It is working fine for all the fields except: KOSTL, ORGEH, STELL. Surprisingly the created IDOC contains the value in these fields but it is not getting updated in master table PA0001. I have tryied inserting the value manually and it is working fine and tried with BDC Programming and no issues. Only we have this issue while we want to use the IDOC. This is mandatory in our interface.
While debugging the IDOC function module I found that one condition is there for these three fields.
CHECK NOT inte IS INITIAL. where inte value is being fetched from table t77s0 based on
GRPID = PLOGI
SEMID = ORGA
In this condition I see no value for this combination and hence it is not getting further. I am not sure how this condition does exist for only these three fields and not for others.
Can any please provide the reasona and solution for this.
Appreciate the help in advance.
Thanks,
JitenderDear Mohan,
Try assigning your cost center to position it will default both your org unit and cost center.
Cheers! -
Dynamic binding of items in sap.m.Table using JS views
HI,
I am developing a master detail page for a Purchase Order application. In master page, i display the list of Purchase Orders & on clicking the PO, i should display the detail page.
We use different ODATA models for Master & detail page. I am able to successfully list the POs in master page & i am struggling on the part where i have to pass the selected PO number to the new ODATA service URL & then display the details in a table.
Below is the code i use on TAP of Purchase order from master page:
tap: function(oEvent)
sap.ui.getCore().byId("PODetailstable_nodata_id").setVisible(false);
var oContext=oEvent.getSource().getBindingContext();
var odataModel_PO_detail = new sap.ui.model.odata.ODataModel(detailServiceUrl,false, "dev_sde", "28aug@2013");
odataModel_PO_detail.setCountSupported(false);
var tappedPONumber= oContext.getProperty("PONumber");
var path = "/POHeaderSet('"+tappedPONumber+"')/HDRtoITM";
PO_DetailsPage.setBindingContext(oContext);
sap.ui.getCore().byId("po_details_table_id").setModel(odataModel_PO_detail);
sap.ui.getCore().byId("po_details_table_id").bindContext(path);
sap.ui.getCore().byId("po_details_table_id").setVisible(true);
And below is the code of my Detail page & the table: I set the bindcontext with new path at "tap" function in master page, i also do bindaggregation for the table with the new path.
The issue is i am able to HIT the new service URL, but no data is displayed. There is also a demo application on the same, but w/o source code it doesnt help me much in resolving this issue.
var PODetailstable_nodata = new sap.m.Table("PODetailstable_nodata_id",{title : "No Data"});
var po_details_table = new sap.m.Table("po_details_table_id", {
inset: true,
headerText: "table for Detail page",
columns: [
new sap.m.Column({
header: new sap.m.Label({ text: "PO Number" }) }),
new sap.m.Column({ header: new sap.m.Label({ text: "Vendor" }) }),
new sap.m.Column({
header: new sap.m.Label({ text: "Vendor Name" }) }),
var oTemplate = new sap.m.ColumnListItem({
cells: [
new sap.m.Text({ text: "{PoNumber}" }),
new sap.m.Text({ text: "{Vendor}" }),
new sap.m.Text({ text: "{VendorName}"})
po_details_table.bindAggregation("items", {
path:"/POHeaderSet('"+"{PONumber}"+"')/HDRtoITM",
template: oTemplate
var PO_DetailsPage = new sap.m.Page("PO_DetailsPage_id",
// title : "Purchase Order Details",
title : "{PoNumber}",
content : [
PODetailstable_nodata,
po_details_table,
footer : new sap.m.Bar
contentRight: [
new sap.m.Button({
text : "Approve",
//press: oController.approve_pr,I have modified my code by referring another forum,
on Tap, i now invoke a method from controller to update the binding i.e to pass the clicked PO number to the context.
updateBinding: function(oEvent)
alert("updatebinding");
var detailServiceUrl = "http://incas1054.ind.cldsvc.accenture.com:8000/sap/opu/odata/sap/ZPURCHASE_PAY_SRV";
var odataModel_PO_detail = new sap.ui.model.odata.ODataModel(detailServiceUrl,false, "dev_sde", "28aug@2013");
odataModel_PO_detail.setCountSupported(false);
var tableView=sap.ui.getCore().byId("po_details_table_id");
tableView.setModel(odataModel_PO_detail);
alert(tableView.getModel());
var oContext = tableView.getBindingContext();
//tableView.bindContext("/POHeaderSet");
alert(oContext);
var path= oContext.sPath + "/HDRtoITM";
var oTemplate = new sap.m.ColumnListItem({
cells: [
new sap.m.Text({ text: "{PoNumber}" }),
new sap.m.Text({ text: "{Vendor}" }),
new sap.m.Text({ text: "{VendorName}"})
tableView.bindItems(path, oTemplate);
Now, i see the PO number is set in the context, but i want to set a different context for details page as i hit different URL, Can anyone suggest on how to set a different context for details page & then pass the PO number from master to detail page? -
Re: How to see transfer structure in sap r/3 system
Hi All,
In generic extraction I have created extract structure ,in the extract structure I have 6 fields but I am trasferring only 4 fields to the BW system ,So it will creates transfer structure in BW System with the 4 fields but when the Transfer structure in sap r/3 generates and how can see the transfer structure in sap r/3 system.I will give full points if i get the correct answer.
Regards,
VenkatHi ,
Data source = extract structure in r/3 system + transfer structure in r/3 system + transfer structure in bw system .
for exmpale you try to extract the following fields
1) vbeln
2) erdat
3) ernam
4)netwr
5)waerk from vbak table but you decided to trasfer only 4 fields expect the erdat in that case
extract structure contains all 5 fields and transfer structure contains 4 fields in BW system expect erdat field,
As far as my knowledge is concern when replicate the data source in bw system and activate the infosource at that time
it will create the transfer structure in r/3 system but I dont know how to see the transfer structure in r/3 system,
please help me in this regard.
Regards,
Venkat -
In BAPI's why the structures are used in table parameters?
Hello sir,
what is BAPI sir? In BAPI's why the structures are used in table parameters? table parameters they are using structures but not using any customized tables ?
regards
rachu.Hello Rachu
BAPIs provide RFC-enabled interfaces to SAP business objects (e.g. like customer, sales order, purchase order, etc.).
A BAPI does basically the same like you would need to do calling the corresponding transaction (e.g. BAPI_SALESORDER_CREATE -> VA01).
Since they are RFC-enabled they can be called from external systems.
BAPIs represent an external interface for the outside world. Very often you will find within the BAPI that there is a mapping done to the (SAP-)internal structures at the beginning of the coding and vice versa at the end of the coding. Thus, you will (almost) never find any DB table name used as type of a BAPI TABLES parameter.
Regards
Uwe -
URGENT HELP !JCO RETURN structure from SAP
Hello,
I am working on my intern project and I got some trouble.
I have used JDBC to access a table in Oracle(this is an independent DB)I updated a column in the table and selected all data that
was marked as 6 based on the update(SAP needs this data). I passed the values to a JCO application,
which connects to SAP and send the data (I presume what I'm doing is correct) to a structure in SAP.
SAP does some internal calculations with the data and should return the data back using the same
structure but this time with some changes on the data.
For example the field steuk is marked as 7 if the data processing was successful and if the data
structure wasn't successful a 6 will be return.
The return Values should be updated in the oracle DB indicating if the transfer was successful
or not. And next time the same data will be sent to SAP following the same path.
Now when I look at the return getString data in Eclipse, the result seems ambiguous.I don't see the data I presumably
sent to the SAP structure using:
JCO.ParameterList list = function.getTableParameterList();
JCO.Table ztable = list.getTable("ZSAORA_RUECK");
for (int i = 0; i < 19; i++) {
ztable.appendRow();
ztable.setValue(value,field name);
Am I doing some thing wrong here??? Any Help will be highly appreciated. Codes could be sent to [email protected]
BELOW are the codes:
CONNECTING TO test_table in Oracle DB:
import java.sql.*;
public class DatabaseConnect {
public static void main(String[] args) {
Connection con = null;
Statement stmt = null;
ResultSet re = null;
String[] ParamArray;
ParamArray = new String[24];
//Properties logon;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection
("jdbc:oracle:thin:@226.190.0.1:1521:testdb","test","test1");
stmt = con.createStatement ();
stmt.executeUpdate("UPDATE test_table set steuk = 6 WHERE steuk = 5");
ResultSet rs = stmt.executeQuery("SELECT mandt,kokrs,werks,arbpl,aufnr,vornr,ile01,"+
"lsa01,ism01,ile02,lsa02,ism02,ile03,lsa03,ism03,"+
"ile04,lsa04,ism04,steuk,matnr,budat,kostl,pernr,"+
"rueckid FROM test_table where steuk =6");
while (rs.next()) {
for (int i = 1; i <= 24; i++){
ParamArray[i-1] = rs.getString(i);
System.out.print(rs.getString(i) + 't');
System.out.println();
} catch(Exception e) {
e.printStackTrace();
} finally {
try
if(stmt != null) stmt.close();
if(con != null) con.close();
} catch (Exception exception) {
exception.printStackTrace();
// Bapi call
TryBapi sap = new TryBapi(ParamArray);
BELOW IS THE JCO Code which connects to SAP and send data to the structure:
import com.sap.mw.jco.IFunctionTemplate;
import com.sap.mw.jco.JCO;
public class TryBapi extends Object {
JCO.Client mConnection;
JCO.Repository mRepository;
OrderedProperties logonProperties;
public TryBapi(String[] paramArray){
try {
logonProperties = OrderedProperties.load("/logon.properties");
mConnection = JCO.createClient((String)logonProperties.get("jco.client.client"),
(String)logonProperties.get("jco.client.user"),
(String)logonProperties.get("jco.client.passwd"),
null,
(String)logonProperties.get("jco.client.ashost"),
String)logonProperties.get("jco.client.sysnr")
mConnection.connect();
mRepository = new JCO.Repository("SAPJCO",mConnection);
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
JCO.Function function = null;
JCO.Table tab = null;
try {
function = this.createFunction("Z_UPDATE_SAORA_RUECK");
if (function == null) {
System.out.println("Z_UPDATE_SAORA_RUECK not found in SAP.");
System.exit(1);
JCO.ParameterList list = function.getTableParameterList();
JCO.Table ztable = list.getTable("ZSAORA_RUECK"); //inserting 24 records loop.
for (int i = 0; i < 24; i++) {
ztable.appendRow(); //ztable.setValue(value, field name)
ztable.setValue("300","MANDT");
ztable.setValue("KOKRS" + i, "KOKRS");
ztable.setValue("WERKS" + i, "WERKS");
ztable.setValue("ARBPL" + i, "ARBPL");
ztable.setValue("AUFNR" + i, "AUFNR");
ztable.setValue("VORNR" + i, "VORNR");
ztable.setValue("ILE01" + i, "ILE01");
ztable.setValue("LSA01" + i, "LSA01");
ztable.setValue("ISM01" + i, "ISM01");
ztable.setValue("ILE02" + i, "ILE02");
ztable.setValue("LSA02" + i, "LSA02");
ztable.setValue("ISM02" + i, "ISM02");
ztable.setValue("ILE03" + i, "ILE03");
ztable.setValue("LSA03" + i, "LSA03");
ztable.setValue("ISM03" + i, "ISM03");
ztable.setValue("ILE04" + i, "ILE04");
ztable.setValue("LSA04" + i, "LSA04");
ztable.setValue("ISM04" + i, "ISM04");
ztable.setValue("STEUK" + i, "STEUK");
ztable.setValue("MATNR" + i, "MATNR");
ztable.setValue("BUDAT" + i, "BUDAT");
ztable.setValue("KOSTL" + i, "KOSTL");
ztable.setValue("PERNR" + i, "PERNR");
ztable.setValue("RUECKID" + i, "RUECKID");
list.setValue(ztable,"ZSAORA_RUECK");
function.setTableParameterList(list);
mConnection.execute(function);
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
JCO.Table codes = null;
try {
codes = function.getTableParameterList().getTable("ZSAORA_RUECK");
System.out.println("Return Values starts HERE:");
for (int i =0; i < codes.getNumRows(); i++){
codes.setRow(i);
System.out.println(codes.getString("MANDT")+ 't'+
codes.getValue("KOKRS")+ 't'+
codes.getString("WERKS")+ 't'+
codes.getString("ARBPL")+ 't'+
codes.getString("AUFNR")+ 't'+
codes.getString("VORNR")+ 't'+
codes.getString("ILE01")+ 't'+
codes.getString("LSA01")+ 't'+
codes.getString("ISM01")
/* codes.getString("ILE02")+ 't'+
codes.getString("LSA02")+ 't'+
codes.getString("ISM02")+ 't'+
codes.getString("ILE03")+ 't'+
codes.getString("LSA03")+ 't'+
codes.getString("ISM03")+ 't'+
codes.getString("ILE04")+ 't'+
codes.getString("LSA04")+ 't'+
codes.getString("ISM04")+ 't'+
codes.getString("STEUK")+ 't'+
codes.getString("MATNR")+ 't'+
codes.getString("BUDAT")+ 't'+
codes.getString("KOSTL")+ 't'+
codes.getString("PERNR")+ 't'+
codes.getString("RUECKID") */
catch (Exception ex) {
ex.printStackTrace();
System.exit(2);
mConnection.disconnect();
public JCO.Function createFunction(String name) throws Exception {
try {
IFunctionTemplate ft = mRepository.getFunctionTemplate(name.toUpperCase());
if (ft == null)
return null;
return ft.getFunction();
catch (Exception ex) {
throw new Exception("Problem retrieving JCO.Function object.");
Message was edited by: Rudolph Emange
Message was edited by: Rudolph EmangeHi Astrid,
Thank you for your remarks. The problem I'm having is that when I do send the values to SAP using the loop:
JCO.ParameterList list = function.getTableParameterList();
JCO.Table ztable = list.getTable("ZSAORA_RUECK");
for (int i = 0; i < 19; i++) {
ztable.appendRow();
ztable.setValue(value,field name);
I do expect to have(or see) some values when I do access the same table structure(This is just a structure and
not a real table as I do understand that there is a different between a structure and a table in SAP) and
not the field names back.In the second try and catch block:
try {
codes = function.getTableParameterList().getTable("ZSAORA_RUECK");
System.out.println("Return Values starts HERE:");
for (int i =0; i < codes.getNumRows(); i++){
codes.setRow(i);
System.out.println(codes.getString("MANDT")+ 't'+
codes.getValue("KOKRS")+ 't'+
codes.getString("WERKS")+ 't'+
codes.getString("ARBPL")+ 't'+
codes.getString("AUFNR")+ 't'+
codes.getString("VORNR")+ 't'+
codes.getString("ILE01")+ 't'+
codes.getString("LSA01")+ 't'+
codes.getString("ISM01")
I'm trying to access the values I sent in the first try and catch block. I presume I should see some real values and not the
field names.This is how my output looks like:
300 KOKR WERK ARBPL0 AUFNR0 VORN ILE
300 KOKR WERK ARBPL1 AUFNR1 VORN ILE
300 KOKR WERK ARBPL2 AUFNR2 VORN ILE
300 KOKR WERK ARBPL3 AUFNR3 VORN ILE
300 KOKR WERK ARBPL4 AUFNR4 VORN ILE
300 KOKR WERK ARBPL5 AUFNR5 VORN ILE
This does not reflect the values but the field names. Why is it this way? Does it mean that my array is wrong or I'm not at all
sending the values. Please HELP ME OUT HERE.
Could any one show me a better way how to send the values selected from Oracle table using perhaps an
ARRAY to the ZSAORA_RUECK structure in SAP?
I am trying to send the values from the select statement in the first jdbc application
to the value field in ztable.setValue(value, field name).
My Regards!
Message was edited by: Rudolph Emange
Maybe you are looking for
-
Missing Characters in Frame Generated PDFs
I had an odd thing happen, that I thought I'd pass on. I was working on my Mac to generate some statistical output. I printed out the results to pdf, imported the results in to a Frame 8 document as a referenced graphic. I then saved as a PDF with al
-
New ipod with major problem?
Ok... last night I received my new 2GB iPod nano (so excited, of course!) I plugged it in, it started charging, the "do not disconnect" was showing on the iPod screen, all of which I know to be normal. I downloaded iTunes version 7, and my iPod didn'
-
How does nokia maps work? BACKEND
Hello everybody, When u give the location coordinates to nokia maps, it will find out the location on the earth and zoom to the point. How does this work, wht is the backend where we can do these manipulations... Can u please help me with this..
-
How to exclude statistic using Data Pump API?
How to exclude all statistics while exporting data using Oracle Data Pump API (DBMS_DATAPUMP package)?
-
When I create PDFs using PDFMaker / Acrobat Pro 9, it converts TOC entries and footnote markers to clickable links but not index entries - is there any way to enable this?