Tables in program
Hi All,
What are the ways to find out the tables used in the program?
thanks & regards
NSK
Hi,
IN the transaction ST05 ..Switch on the SQL TRACE ..
Execute your program..
Switch off the SQL trace..
THen Press "List trace" button in ST05 to see the SQLs used..
Thanks
Vikranth
Similar Messages
-
Any table or program to get the number of records in P, A and F tables
HI all
any table for program to get the number of records in P, A and F tables. I want to create SQ01 queries to get the status of number of records. We are gng for a production cutover next week. Want to capture all the data before and after Upgrade cutover.
Also suggest me how to create sq01 queries.
Thanks in advance
regards
Janardhan KUmar K.Use Transaction LISTSCHEMA to see all the tables assosciated with ur cube
Total number would be what you find in both the E & F fact tables. If there is no compression in the cube then E table will be empty.
Alternatively u can use se16 transaction and enter E table and F table manually
E table - /BIC/E(Cube name) and Ftable - /BIC/F(Cube name)
Or else u can go to the manage of the cube and without selecting any field for O/P and ticking the option output number of hits execute. The total of Row Count will give u the total no of records in the cube. -
Pass internal table from program to another program
hi,
how do i pass an internal table from program to another program, then read it.
tnx,
laureExport the selected rows to the next program
EXPORT final TO MEMORY ID 'ABC'.
CALL TRANSACTION 'XXX'.
XXX is the tcode for the other program where u want to import the values.
In the second program
INITIALIZATION.
IMPORT the internal table from the first program
IMPORT final FROM MEMORY ID 'ABC'.
Dont refesh the internal table final. -
Add Table maintenance program for custom table to an existing func group
Hi Guys,
Can I add Table maintenance program for custom table to an existing function group or I need to create a new
function group for each custom table.
Thanks,
miniYou can add to an existing function group, there's nothing technically to stop you doing this. However, consider that this is creating generated function modules in this function group and you would be wise to avoid using a function group containing manually created modules.
I personally always create a new function group, using the name of the table as the name of the function group.
Regards,
Nick -
How to pass Tables through program line.
Hi All,
I have requirment in smart forms.
I need to execute smartforms in form itself. means no chance to run with driver program.
So i created program line which where write our logic for internal table. My question is how to pass created internal table from program line. i need to display the internal table data using loop.
Thanks,
SubbuHi,
Try this :
code
REPORT report2.
DATA: text TYPE c LENGTH 10,
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
range_tab LIKE RANGE OF text,
range_line LIKE LINE OF range_tab.
rspar_line-selname = 'SELCRIT1'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-low = 'ABAP'.
APPEND rspar_line TO rspar_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'H'.
APPEND range_line TO range_tab.
range_line-sign = 'E'.
range_line-option = 'EQ'.
range_line-low = 'K'.
APPEND range_line TO range_tab.
SUBMIT report1 USING SELECTION-SCREEN '1100'
WITH SELECTION-TABLE rspar_tab
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
[/code]
Reward points if found helpful.....
Cheers,
Chandra Sekhar. -
Interface tables, Seeded program and error Table
Hi can any one let me know the interface tables, Seeded program and error tables for
1) On hand_quantity Interface
2) Sub inventory transfer conversion
Version: 11.5.10
DB: 10g
Thanks & Regards,
pallisHi Pallis,
Pl.refer following links for sub-inventory transfer.
Inventory API interface transaction loading
http://khalidmehmoodapps.blogspot.in/2010/08/inter-org-inventory-transfer.html
http://khalidmehmoodapps.blogspot.in/2010/08/inter-org-inventory-transfer.html
HTH
sanjay -
Updating database table via program
Hi,
I am updating a DB table (Sap standard table) via my program.
I have few doubts with regard to same. They are given below,
1. I came to know that it is not best practise to update the sap standard table via program using "update" statement. Why so? Is there any other way or statement in doing the same?
2. The sap standard table which i update via my program is BDRGIN. Now my question is, when my program is modifying the values of the table, if some other user also modifies the value at the same time via SE16 then conflict occurs. How to resolve it? Is SAP uses any automatic handling for such conflicts?
kindly help me out.
Regards,
Raghavendraprasad.NHi,
Its not a good practise to modify the Standards tables through programs, because most of the standard tables will be interdependant with forign key relation ships (check table relations). So incase we create an irrelavant entry, then it will cause a lot of confusions.
For example we create entries in MARA/MAKT table using MM01/02 transactions.
There are a few standard tables like TVSA (containing customising data), these have to be maintained through the SPRO transaction. You can open SPRO transaction and search for the node to maintain entries in it or you can go to the transaction SM30 and you can give the table name and click on customizng to go the SPRO node.
Still if you are trying to create entries in your table, Enque/Lock the table do the updations and then Deque/Unlock the table, so that there will be no conflicts happening during that time.
Regards,
S.Dakshna Nagaratnam. -
Table control program for updating database table
Does anybody have a sample code for a table control program which can insert/delete/update a database table?
I mean like on the output on table control, if the user insert/delete/update the records, the corresponding records will be updated in database table also.
Appreciate your input.
Thanks.hi nuren,
TABLES: kna1,knbk.
DATA: v_kunnr LIKE kna1-kunnr.
DATA: v_check TYPE c.
DATA: BEGIN OF it_knbk OCCURS 0,
banks LIKE knbk-banks,
bankl LIKE knbk-bankl,
bankn LIKE knbk-bankn,
bkont LIKE knbk-bkont,
koinh LIKE knbk-koinh,
chk TYPE c,
END OF it_knbk.
DATA: v_ucomm TYPE sy-ucomm,
v_dynnr TYPE sy-dynnr.
DATA: l_index TYPE sy-index.
data: count type i.
CONTROLS: tc1 TYPE TABLEVIEW USING SCREEN 0200.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'ABC'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
v_ucomm = sy-ucomm.
CASE v_ucomm.
WHEN 'DISP' OR 'CHNG'.
IF v_kunnr <> space.
SELECT banks
bankl
bankn
bkont
koinh
FROM knbk
INTO TABLE it_knbk
WHERE kunnr = v_kunnr.
LEAVE TO SCREEN '0200'.
ENDIF.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module MOD_KUNNR INPUT
text
MODULE mod_kunnr INPUT.
IF NOT v_kunnr IS INITIAL.
SELECT SINGLE
kunnr
FROM kna1
INTO v_kunnr
WHERE kunnr = v_kunnr.
IF sy-subrc <> 0.
MESSAGE e000(zz) WITH 'INCORRECT CUSTOMER NUMBER'.
ENDIF.
ENDIF.
IF v_kunnr IS INITIAL.
MESSAGE e000(zz) WITH 'PLEASE ENTER A VALUE'.
ENDIF.
ENDMODULE. " MOD_KUNNR INPUT
*& Module STATUS_0200 OUTPUT
text
MODULE status_0200 OUTPUT.
SET PF-STATUS 'ABC1'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module SCREENMOD OUTPUT
text
MODULE screenmod OUTPUT.
IF v_ucomm = 'DISP'.
LOOP AT SCREEN.
screen-input = 0.
MODIFY SCREEN.
ENDLOOP.
ELSE."if v_UCOMM = 'CHNG'.
LOOP AT SCREEN.
IF screen-group1 = 'G1'.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
endif.
if sy-ucomm = 'INSE'.
loop at screen.
IF ( tc1-current_line <> tc1-lines ).
screen-input = 0.
else.
screen-input = 1.
modify screen.
endif.
endloop.
endif.
ENDMODULE. " SCREENMOD OUTPUT
*& Module EXIT2 INPUT
text
MODULE exit2 INPUT.
LEAVE TO SCREEN 0.
ENDMODULE. " EXIT2 INPUT
*& Module modify INPUT
text
MODULE modify INPUT.
IF v_check = 'X'.
it_knbk-chk = 'X'.
MODIFY it_knbk index tc1-current_line.
ELSE.
CLEAR it_knbk-chk .
ENDIF.
ENDMODULE. " modify INPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE user_command_0200 INPUT.
v_ucomm = sy-ucomm.
CASE v_ucomm.
WHEN 'DELE'.
DELETE it_knbk where chk eq 'X'.
DESCRIBE TABLE it_knbk LINES tc1-lines.
WHEN 'INSE'.
CLEAR it_knbk.
APPEND it_knbk.
DESCRIBE TABLE it_knbk LINES tc1-lines.
WHEN 'LIST'.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN '0200'.
WRITE 'Report'.
WHEN 'BACK'.
LEAVE TO SCREEN '0100'.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Module validate INPUT
text
module validate input.
IF IT_KNBK IS INITIAL.
MESSAGE E000(ZZ) WITH 'A BLANK LINE CANNOT BE SAVED'.
ENDIF.
endmodule. " validate INPUT -
Settlement Receiver Value not Saved in Table Control Program
Hi,
I have Table control program regarding to Equipment Log, where in output it show the Equipment details with Account assignment category, General settlement receiver, Shift Hours, Work Hours, Idle Hrs, Maint. Hrs., Production Hours etc...
In report, we have a formula i.e.
Shift Hrs. = Work Hours + Idle Hrs + Maint. Hrs. + Production Hours.
and all those fields are linked to each other.
If we want that Work Hours should be 0, then msg showing - Working Hrs. should be entered. , means without enter Working Hrs. value we cann't save it.
Now we removed the link of Working Hrs to others, means if we insert value 0 of Working Hrs., no msg showing. BUT Problem is this after remove this link, General settlement receiver value should not be saved.
We want Work Hrs. as 0 value and General settlement receiver value must not be BLANK. It should be Saved.
Plz guide..hi
write a if statement after the Shift Hrs. = Work Hours + Idle Hrs + Maint. Hrs. + Production Hours.
if work hours = 0, message i000 with 'Working Hrs. should be entered'.
else ,write:/ shift hrs.end if. try to create a button for save when you click data will be saved or create a subrountine perform shift hrs than use if loop and select form end form inside keep Shift Hrs. = Work Hours + Idle Hrs + Maint. Hrs. + Production Hours.
thanking you -
Hi experts,
Please give me information about table control programming.
explain it with example.
Thanks & Regards,
Rajesh KumarHi Rajesh,
Lets say the table has more than 20 fields and at first shot there are say 15 screen fields and to enter the 16th field you have to press page down so in this case you have to have a control on table..
The below example would help you to analyse..
check the example...
*"Selection screen elements............................................
parameters:
p_file like rlgrap-filename.
*" Data declarations...................................................
* Work variables *
data w_file type string.
data wa(80) type c.
data : w_fname(20),
w_tabix(2) type n,
w_table(20),
w_index,
w_fkey(20),
w_ftype(20),
w_flen(20),
w_fdesc(20).
*" Internal table declarations.........................................
* Internal table to hold *
data:
begin of itab_fields occurs 0,
count,
fname(20),
fkey,
ftype(10),
flen(10),
fdesc(30),
end of itab_fields.
data:
begin of itab_header occurs 0,
dbcheck,
tname(20),
tdesc(40),
devclass,
maintain,
end of itab_header.
data t_data like standard table of wa .
data:
t_bdcdata like
standard table of bdcdata with header line.
data w_count type i.
* AT SELECTION-SCREEN ON VALUE-REQUEST EVENT *
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
* EXPORTING
* PROGRAM_NAME = SYST-CPROG
* DYNPRO_NUMBER = SYST-DYNNR
* FIELD_NAME = ' '
importing
file_name = p_file
w_file = p_file.
* START-OF-SELECTION EVENT *
start-of-selection.
call function 'GUI_UPLOAD'
exporting
filename = w_file
filetype = 'ASC'
* HAS_FIELD_SEPARATOR = 'X'
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* IMPORTING
* FILELENGTH =
* HEADER =
tables
data_tab = t_data
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at t_data into wa.
if wa+0(1) eq 'H'.
shift wa by 2 places left.
split wa at ',' into itab_header-dbcheck
itab_header-tname
itab_header-tdesc
itab_header-devclass
itab_header-maintain.
append itab_header.
clear itab_header.
add 1 to w_count.
else.
shift wa by 2 places left.
split wa at ',' into itab_fields-fname
itab_fields-fkey
itab_fields-ftype
itab_fields-flen
itab_fields-fdesc.
write w_count to itab_fields-count.
append itab_fields.
clear itab_fields.
endif.
endloop.
call function 'BDC_OPEN_GROUP'
exporting
client = sy-mandt
* DEST = FILLER8
group = 'PADMA'
* HOLDDATE = FILLER8
* KEEP = FILLER1
user = sy-uname
* RECORD = FILLER1
* PROG = SY-CPROG
* IMPORTING
* QID =
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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at itab_header.
w_table = itab_header-tname.
w_index = sy-tabix.
refresh t_bdcdata.
perform populate_se11.
call function 'BDC_INSERT'
exporting
tcode = 'SE11'
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
* CTUPARAMS = ' '
tables
dynprotab = t_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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
refresh t_bdcdata.
perform populate_se13.
call function 'BDC_INSERT'
exporting
tcode = 'SE13'
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
* CTUPARAMS = ' '
tables
dynprotab = t_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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
refresh t_bdcdata.
perform activate.
call function 'BDC_INSERT'
exporting
tcode = 'SE11'
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
* CTUPARAMS = ' '
tables
dynprotab = t_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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endloop.
call function 'BDC_CLOSE_GROUP'
exceptions
not_open = 1
queue_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.
*& Form POPULATE_SE11
* This subroutine is used to populate SE11 transaction data *
* No interface parameters *
form populate_se11 .
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=ADD'.
perform bdc_field using 'RSRD1-TBMA'
itab_header-dbcheck.
perform bdc_field using 'RSRD1-TBMA_VAL'
itab_header-tname.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_OKCODE'
'=CHANGE_MAINTFLAG'.
perform bdc_field using 'DD02D-DDTEXT'
itab_header-tdesc.
perform bdc_field using 'BDC_CURSOR'
'DD02D-MAINFLAG'.
perform bdc_field using 'DD02D-CONTFLAG'
itab_header-devclass.
perform bdc_field using 'DD02D-MAINFLAG'
itab_header-maintain.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_OKCODE'
'=DEF'.
perform bdc_field using 'DD02D-CONTFLAG'
'A'.
perform bdc_field using 'DD02D-MAINFLAG'
'X'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_OKCODE'
'=FTYP'.
w_tabix = 0.
loop at itab_fields where count eq w_index.
add 1 to w_tabix.
if w_tabix gt 13.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_CURSOR'
w_fname.
perform bdc_field using 'BDC_OKCODE'
'=P+'.
w_tabix = 2.
endif.
concatenate 'DD03P-FIELDNAME(' w_tabix ')' into w_fname.
concatenate 'DD03P-KEYFLAG(' w_tabix ')' into w_fkey.
concatenate 'DD03D-DATATYPE(' w_tabix ')' into w_ftype.
concatenate 'DD03P-LENG(' w_tabix ')' into w_flen.
concatenate 'DD03P-DDTEXT(' w_tabix ')' into w_fdesc.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using w_fname
itab_fields-fname.
perform bdc_field using w_fkey
itab_fields-fkey.
perform bdc_field using w_ftype
itab_fields-ftype.
perform bdc_field using w_flen
itab_fields-flen.
perform bdc_field using w_fdesc
itab_fields-fdesc.
endloop.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_OKCODE'
'=WB_SAVE'.
perform bdc_dynpro using 'SAPLSTRD' '0100'.
perform bdc_field using 'BDC_OKCODE'
'=ADD'.
perform bdc_field using 'KO007-L_DEVCLASS'
'Z1139'.
perform bdc_field using 'KO007-L_AUTHOR'
'SAPDEV02'.
perform bdc_dynpro using 'SAPLSTRD' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=LOCK'.
perform bdc_field using 'KO008-TRKORR'
'TR1K900085'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_CURSOR'
'DD03P-DDTEXT(03)'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
endform. " POPULATE_SE11
*& Form POPULATE_SE13
* This subroutine is used to populate SE13 data *
* No interface parameters *
form populate_se13 .
perform bdc_dynpro using 'SAPMSEDS' '0010'.
perform bdc_field using 'DD09V-TABNAME'
w_table.
perform bdc_field using 'BDC_OKCODE'
'PFLG'.
perform bdc_dynpro using 'SAPMSEDS' '0050'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform bdc_field using 'DD09V-TABART'
'APPL0'.
perform bdc_field using 'DD09V-TABKAT'
'0'.
perform bdc_field using 'ALLOWSTATE-NOT_ALLOWED'
'X'.
perform bdc_dynpro using 'SAPMSEDS' '0050'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_field using 'DD09V-TABART'
'APPL0'.
perform bdc_field using 'DD09V-TABKAT'
'0'.
perform bdc_field using 'ALLOWSTATE-NOT_ALLOWED'
'X'.
perform bdc_field using 'BDC_OKCODE'
'=WB_BACK'.
perform bdc_dynpro using 'SAPMSEDS' '0050'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_dynpro using 'SAPMSEDS' '0010'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
endform. " POPULATE_SE13
*& Form ACTIVATE
* This subroutine is used to activate the table from SE11 *
* No interface parameters. *
form activate .
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'RSRD1-TBMA'
'X'.
perform bdc_field using 'RSRD1-TBMA_VAL'
w_table.
perform bdc_field using 'BDC_OKCODE'
'ACT'.
perform bdc_dynpro using 'SAPLSEWORKINGAREA' '0205'.
perform bdc_field using 'BDC_OKCODE'
'=WEIT'.
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
endform. " ACTIVATE
*& Form bdc_dynpro
* This subroutine is used to populate the screen information *
* -->prgname Program name
* -->screenno Screen number
form bdc_dynpro using value(prgname)
value(screenno).
clear t_bdcdata.
t_bdcdata-program = prgname.
t_bdcdata-dynpro = screenno.
t_bdcdata-dynbegin = 'X'.
append t_bdcdata.
endform. " bdc_dynpro
*& Form bdc_field
* This subroutine is used to populate the field values *
* -->fnam Field name *
* -->fval Field value *
form bdc_field using value(fnam)
value(fval).
clear t_bdcdata.
t_bdcdata-fnam = fnam.
t_bdcdata-fval = fval.
append t_bdcdata.
endform. " bdc_field
******flat file ******
**H,X,Z1139_REC_30,Recorded Table,A,X*
**I,mandt,X,clnt,3,Client*
**I,ENO,X,char,6,Employee Number*
**I,ENAME, ,Char,20,Employee Name*
**I,deptno, ,char,10,Department Number*
**I,salary, ,int4, ,Salary*
**I,deptno,X,char,10,Department Number*
**I,dname, ,char,20,Department Name*
**I,Locate, ,char,20,Location*
**I,deptno,X,char,10,Department Number*
**I,dname, ,char,20,Department Name*
**I,Locate, ,char,20,Location*
**I,deptno,X,char,10,Department Number*
**I,dname, ,char,20,Department Name*
**I,Locate, ,char,20,Location*
**I,deptno,X,char,10,Department Number*
**I,dname, ,char,20,Department Name*
**I,Locate, ,char,20,Location*
**I,deptno,X,char,10,Department Number*
**I,dname, ,char,20,Department Name*
**I,Locate, ,char,20,Location*
**H,X,Z1139_REC_31,Recorded Table,A,X*
**I,mandt,X,clnt,3,Client*
**I,deptno,X,char,10,Department Number*
**I,dname, ,char,20,Department Name*
**I,Locate, ,char,20,Location*
hope the above example would help you and solve your issue.
Regards
Narin Nandivada -
Re: how to create a temporary index for a table in program
Hi,
I execute a report to access table EKBE. The field that is essential is the CPUDT - entry date.
Now, the EKBE is not index with this field.
I do not want to create a permanent index which might occupied space. The current read on EKBE is sequential.
I thought of creating an index in the program and then releases it once the report is out.
Is there a way to achieve that?Hi,
You can dump the data into one internal table and create index of that internal table like this:
tables: ekbe.
data: begin of itab occurs 0,
cpudt like ekbe-cpudt,
indx type i,
end of itab.
select cpudt up to 10 rows
from ekbe into table itab.
loop at itab.
itab-indx = sy-tabix.
write:/ itab-cpudt, itab-indx.
endloop.
Regards,
Bhaskar -
Download a special kind of internal table (dynamic programming)
Hi guys,
with dynamic programming, i've created a complex internal table of this type :
KNA1 |
KNB1 |
GS_CUSTOMERADDRESS |
GS_CUSTOMERGENERALDETAIL |
The declaration of the internal table is :
TYPES: BEGIN OF gty_record,
table TYPE tabname,
dataref TYPE REF TO data,
END OF gty_record.
This means that each line, has a different line-type. In the first field of the table, i have the name of the structure. In the second, the data-part (in debug double click on leads to structure contents - field by field).
The structure KNA1 contains C and packed (P) fields also so when i pass the internal table to FM GUI_DOWNLOAD, i have this short-dump : UC_OBJECTS_NOT_CONVERTIBLE.
Is there a way to solve this problem quickly?
The goals is download all data of a customer into a local file. Data is distribuited on different structures, readed by standard bapi 'BAPI_CUSTOMER_GETDETAIL2'. This file will be read in another program, of another system.
Any hints/suggestion will be appreciated.
Thanks a lot.
AndreaHi Sandra,
thx for you suggestions.
About your answer :
" Or use a DO. ASSIGN COMPONENT sy-index OF STRUCTURE ... to loop at each field, and do whatever you want with them (using WRITE ... TO ... for example, to convert numbers into text)."
I cannot use this approach to the problem, because i should keep in mind the dimension of single fields and the blanks should be concatenated also, but RESPECTING BLANK switch of concatenate instruction doesen't exists in 4.7 abap.
Sure, i can use a workaround, but i'll have a lot of programming.
"you could use XML for instance. It's rather standard! By using CALL TRANSFORMATION ID SOURCE dataObject RESULT XML string."
This could be the solution. I've already read some posts about it before write mine. I should test it: i don't know if in 4.7 release works. So i could transform the internal table to xml and save to text file.
But then, how i can read xml string and mapping again in this special kind of table ?
Is CALL TRANSFORMATION ID SOURCE XML String RESULT Dataobject instruction sufficient to perform this task?
Thanks a lot
Andrea
BR
Sandra -
How to read internal table other program (assign?)
Hello techies,
The problem >
I have 2 Sap standard programs A & B
I'm editing a userexit in program B but I need to read
data from program A that is also running.
While using the debugger, I can ask for the folowing
(A)internaltable
example : (SAPLMEPO)pot
this shows the content of internal table "pot" of the program "SAPLMEPO".
The question>
How can I copy the content of a table(ex. pot) in program "A"(ex. SAPLMEPO) to a internal table pot2 of program "B"?
Possible sollution (does not work in 5.0)
CODE SAMPLE *************
Fields **
data: w_name type char50,"help field
w_recpot like ekpo."help structure
Internal tables **
data: Begin of it_pot2 occurs 0.
include structure it_pot2.
data: End of it_pot2
field-symbols <fs_pot> type any table.
w_structure_name = '(SAPLMEPO)pot'.
assign (w_structure_name) to <fs_pot>.
loop at <fs_pot> into w_recpot.
it_pot2 = w_recpot.
append it_pot2
Endloop.
END CODE SAMPLE *************
Thanks in advance,
FrederikHi again,
1. Simple.
2. In your case, u should use
<b>[]</b>
DATA : myitab LIKE TABLE OF t001 WITH HEADER LINE.
DATA : w_struct_name(100) TYPE c.
BREAK-POINT.
FIELD-SYMBOLS <fs_pot> TYPE ANY TABLE.
<b> w_struct_name = '(ZAM_TEMP0)ITAB[]'.</b>
ASSIGN (w_struct_name) TO <fs_pot>.
3. No need to use Loop etc.
4. *----
In your case
CODE SAMPLE *************
Fields **
data: w_name type char50,"help field
w_recpot like ekpo."help structure
Internal tables **
data: Begin of it_pot2 occurs 0.
include structure it_pot2.
data: End of it_pot2
field-symbols <fs_pot> type any table.
w_structure_name = '<b>(SAPLMEPO)POT[]</b>'.
assign (w_structure_name) to <fs_pot>.
NOT REQUIRED
*loop at <fs_pot> into w_recpot.
*it_pot2 = w_recpot.
*append it_pot2
*Endloop.
END CODE SAMPLE *************
regards,
amit m. -
Which table stores program names?
Hi,
Which table stores the program names.
Suppose i have a program with name ZTEST.
And the program ZTEST has 2 more include programs ZTEST_TOP and ZTEST_MAIN.
Now the requirement is that i'll have the program name (Say ZTEST), I need to fectch the includes associated with e program.
I wanna know which table stores this data(program and its corresponding includes).
Thanks in adavance.
VishnuHi,
If you are using this for searching the includes of your z program/function group, you can filter out the objects starting with "Z","Y","LZ","LY".
Regards
Vinod -
hai I have problem in table control in 'se80'
create table control in screen painter and the program is follow,,,,,,
__1.include__
TABLES SPFLI.
CONTROLS MYTABLE TYPE TABLEVIEW USING SCREEN 110.
DATA: ITAB LIKE SPFLI OCCURS 0 WITH HEADER LINE.
2.flow logic
PROCESS BEFORE OUTPUT.
LOOP AT ITAB WITH COTROL MYTABLE CURSOR MYTABLE-CURRENT_LINE.
***LOOP WITH CONTROL mytable."-current_line.
MODULE status_0110.
ENDLOOP.
here it ll show the error 'itab is not data base table'
PROCESS AFTER INPUT.
MODULE user_command_0110.
LOOP AT ITAB.
***LOOP WITH CONTROL mytable."-current_line.
ENDLOOP.
3. pbo event.
*& Module status_0110 OUTPUT
text
module status_0110 output.
SPFLI-CARRID = ITAB-CARRID.
SPFLI-CONNID = ITAB-CONNID.
SPFLI-CITYFROM = ITAB-CITYFROM.
SPFLI-CITYTO = ITAB-CITYTO.
SPFLI-FLTIME = ITAB-FLTIME.
endmodule. " status_0110 OUTPUT
4.pai event
*& Module user_command_0110 INPUT
text
module user_command_0110 input.
CASE SY-UCOMM.
WHEN 'DISPLAY'.
SELECT * FROM SPFLI INTO TABLE ITAB .
*MYTABLE-LINES = SY-DBCNT.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
endmodule. " user_command_0110 INPUT.
when creating transaction it ll show error' GUI capability of transaction Z1234 classified '..
any modify my program and send to me ..........
and send me the example program and description,,,,,,,,,,
thankyouTABLES SPFLI.
CONTROLS MYTABLE TYPE TABLEVIEW USING SCREEN 110.
DATA: ITAB LIKE SPFLI OCCURS 0 WITH HEADER LINE.
2.flow logic
PROCESS BEFORE OUTPUT.
LOOP AT ITAB WITH COTROL MYTABLE CURSOR MYTABLE-CURRENT_LINE.
ENDLOOP.
MODULE status_0110.
here it ll show the error 'itab is not data base table'
PROCESS AFTER INPUT.
MODULE user_command_0110.
LOOP AT ITAB.
ENDLOOP.
3. pbo event.
*& Module status_0110 OUTPUT
text
module status_0110 output.
endmodule. " status_0110 OUTPUT
4.pai event
*& Module user_command_0110 INPUT
text
module user_command_0110 input.
CASE SY-UCOMM.
WHEN 'DISPLAY'.
SELECT * FROM SPFLI INTO TABLE ITAB .
*MYTABLE-LINES = SY-DBCNT.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
endmodule. " user_command_0110 INPUT
and in painter the table control column name should be ur internal table field name
like
itab-abc
itab-ffsf
regards
anil chaudhary -
How to implement search help instead of match code objects table in program
Hi,
We are now in upgrade process of code remediation ( From 4.6c to EC6.0).
We have created search helps instead of matchcode object table. This match code object table M_VMVLC has been deleted
in EC6.0. And search help VMVLC is available.
In the program, they have used <M_VMVLC > -<fieldname> i.e. <tablename> - <fieldname> in declaring parameters,
in the 'into' clause of select statement, in the 'from' clause of select statement, in the 'write' statement.
I want to know how to replace this matchcode object table with the search help in the program.
Thanks,
Abirami.Hi,
Check the link
http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21ee2b446011d189700000e8322d00/content.htm
Regards,
Amit
Maybe you are looking for
-
Can I hook an Powerbook hard drive to an external drive bay?
I'm trying to help a friend out with his Powerbook. For some reason, when he plugs in the power cable to it, it doesn't seem to recognize it. He's tried 3 different cables, so I'm thinking it's the piece in the motherboard. Now, Mac motherboards ar
-
Hi All, In my ALV there is one field which is displayed as icon.On clicking the icon a popup should be displayed.My Issue is this is an Heirarchial ALV where header and item should be displayed. i want this icon to be displayed only at item level. I
-
Hi there, I've tried to package my app with the latest Xcode 4.5 (version 19 Sep 2012) iOS 6 SDK, Flash Builder 4.6, Flex SDK 4.6 with Air 3.5 Beta overlay. and unzip the .ipa file and i found the following automated settings on the Info.plist file w
-
How do I delete the "other" memory from my Iphone 4?
Most of the memory on my phone is taken by music, but the "other" memory is getting annoying. It takes up 1.34GB and i want to delete it. can anyone help me?
-
Header for 'ZFI_ITEMS_DISPLAY'
Hi, I have made function module similar to "FI_ITEMS_DISPLAY" as 'ZFI_ITEMS_DISPLAY' .... As output is coming in ALV...can anybody tell me how to write for the Header of this alv report.... In normal alv we use to pass exporting parameter i_cal