How to reflect the changes made in the internal table?
Hi,
I changed one field of the internal table.
i used
modify workarea. in the loop.
when i am debugging that row is getting modified but after execution when i am displaying that changes are not reflected. why?
hi it should work, just check whether u have worked correctly with SY-TABIX..
LOOP AT T_VBRK_VBRP.
V_SYTAB = SY-TABIX.
AT NEW VBELN.
READ TABLE T_VBRK_VBRP INDEX V_SYTAB.
READ TABLE IT_VBRK WITH KEY VBELN = T_VBRK_VBRP-VBELN.
IF SY-SUBRC = 0.
T_VBRK_VBRP-FKDAT = IT_VBRK-FKDAT.
MODIFY T_VBRK_VBRP TRANSPORTING FKDAT
WHERE VBELN = IT_VBRK-VBELN.
ENDIF.
ENDAT.
ENDLOOP.
<b>Check this code too where we assign Sy-Tabix to another variable</b>
LOOP AT IT_VBRK.
CTAB = SY-TABIX.
LOOP AT IT_T001 WHERE BUKRS = IT_VBRK-BUKRS.
IF SY-SUBRC = 0.
IT_VBRK-BUTXT = IT_T001-BUTXT.
MODIFY IT_VBRK INDEX CTAB.
CLEAR CTAB.
ENDIF.
ENDLOOP.
ENDLOOP.
<b>Award points if found helpful</b>
Similar Messages
-
How to import the internal table into subroutine as parameter
how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine
Hi Yong,
try this:
parameters: p_tabnm like dd03l-tabname.
field-symbols: <fs_tabname> type standard table.
data: itab_ref type ref to data.
create data itab_ref type standard table of (p_tabnm)
with default key.
assign itab_ref->* to <fs_tabname>.
select * from (p_tabnm) into table <fs_tabname>.
perform subroutine tables <fs_tabname>
using p_tabnm.
*& Form subroutine
text
-->P_<FS_TABNAME> text
-->P_P_TABNM text
form subroutine tables p_tabname type standard table
using p_tabnm.
Here p_tabname already has the structure of the table you gave as input
parameter
endform. " subroutine -
How to Read the internal table for the data download from the spool
HI all,
I have one issue regarding the spool ,we are getting the correct output as per requirement of user but when we send the same to the user in pdf format they did notget the same.
they are telling that the due date is missing from the pdf.
Please advice me how to track the internal table for the spool data converted intopdf in a readable format.
the FM used for the above task is :
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
Please reply if any one worked on the same.
Thanks in advance.
Gaurav,Hi Wang,
Please let me know how you solved your question.
Points will be rewarded.
Thanks,
Arun. -
How to Pass the internal table data?
DearAll,
How to pass the Data of one internal table on a 1.html page to another html page for output, in BSP Application.
regards.Hi ,
In the onInputProcessing event of the first page , write the following code...
call method NAVIGATION->SET_PARAMETER exporting
name = 'it_filt_cur'
value = it_filt_cur.
Here it_filt_cur is internal table.
NAVIGATION->GOTO_PAGE('next.htm').
In the next page , you can make the internal table as auto in the attributes.
Since you have made the itab as auto transfer , you can directly access the itab in the initialization event of the next page if it is stateless.
Regards,
Laxman Nayak.
Message was edited by: Laxman Nayak -
How to pass the internal table defined in program to ALV
Hi Friends,
I have a doubt regaring the ALV's,
How can we pass the internal table defined in the program to ALV by not filling the attribute (I_STRUCTURE_NAME) in the REUSE_ALV_LIST_DISPLAY.
I have tried many ways but unable to pass the structure of the internal table. I am getting the error message "Field Catalog Not Specified......" and its terminating and when i am giving the I_STRUCTURE_NAME = 'INTERNAL-TABLE-NAME' then its displaying a blank screen with all the tool-bars and icons...(No output of internal table data is seen on the screen) .
and when i am passing the DDIC table or structure ( for eg. LFA1) to I_STRUCTURE_NAME then its displaying with any error.
Plaese help in resolving this problem....
Regards
Pradeep GoliHi,
Check this thread which gives example of ALV. This will give you an idea.
Interactive ALV
ashish -
How to pass the internal table data to smartforms
Hi Gurus,
I have a problem in passing the internal table data to the smartforms. In the print program
I get the data into one internal table "LT_PRDLBL1". I am passing this internal table to the other in print program by calling the FM_NAME.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = T_SSFCTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = T_SSFCOMPOP
USER_SETTINGS = ' '
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
LT_PRDLBL = LT_PRDLBL1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
In the print program I had defined the internal tables like
Data: lt_prdlbl type standard table of zprdlbl.
Data: Begin of lt_prdlbl1 occurs 0.
include structure zprdlbl.
Data: End of lt_prdlbl1.
How do I define the internal table in the smartform to get the values printed in the smartform?.
<REMOVED BY MODERATOR>
Thanks,
Edited by: Alvaro Tejada Galindo on Apr 21, 2008 1:01 PMNehal,
Thanks for quick response.
In the smartform under the Form Interface->Tables tab
I had defined
LT_PRDLBL LIKE ZPRDLBL. If I define TYPE instead of LIKE I get the error message saying "FLAT TYPES may only be referenced using LIKE for table parameters".
In the main window I have created LOOP, in which I have ticked the internal table and
LT_PRDLBL INTO LT_PRDLBL. In the text node I am passing the values of this internal table
<_PRDLBL-XXXX&.
I am able to get the print but the data is not printing.
Please help me with this.
Thanks, -
How to Pass the Internal table of a report to Smart Form
Hi Experts,
I have one report in which from selection screen i am getting the values from the users, and upon that values i am filling data in to the internal table.
Now i want to pass that internal table data to the smart form
and print that data in the smart form.
So could you pls give me some pseudo code or any steps to achieve it.
Thanks & Regards,
DSHi DS,
First of all you need to create a SF and then need to call the FM generated by the FM in your report.
In the SF in the form interface>tables tab>mention the name of the table and its type structure.
Pls note that a new structure has to be created as the same type of your internal table which holds the data.
And the import and export parameters as just the same as in a FM.
Now after you create and activate your SF a FM will be generated (wen u execute your SF you will be taken to this SE37 screen with the name of FM so no probs..)
You can call this FM in your report. Hope this helps.
Ex:
say itab has your final data, and you also want to export a variable var1 to the SF.
after your normal report operations end, call the FM and pass on these data.
say your FM name is FM1.
call function FM1
exporting
var1 = var1
tables
itab1 = itab1.
pls note that in the SF also i gave the same names, it is not mandatory to give the same names.
and as you want to print a table in the smartforms, you need to create a table in the smart forms and then display the data which is quite simple.
Hope this helps...
if you need any further explanations, pls revert...
Regards,
Narendra.
Reward points if helpful!!! -
How to structure the internal table issue I want to download to excel
Hi ,
I am trying to download the data from the internal table whose structure was
i HAVE ONE INTERNAL TABLE WHICH IS
123 ABC MIKE
123 ABC DALLAS
123 ABC BOMBAY
345 BCD MEENAL
345 BCD SHINDE
345 BCD UJWALA
I want the output the i WANT THE INTERNAL TABLE TO STRUCTURE IN THIS WAY
123 ABC MIKE
DALLAS
BOMBAY
345 BCD MEENAL
SHINDE
UJWALAU have to fill internal table as ..
Loop at ITAB. <-- contains all the values
at new field2.
itab1 = itab.
append itab1.
clear itab1.
continue.
endat.
clear : itab-field1 , itab-field2.
itab1 = itab.
append itab1.
clear itab1.
endloop.
Now download ITAB1. -
How to print the internal tables in grid format
i have an internal table with 3 fields
ITAB1
1 a
2 b
3 c
I want to print this in the gird like
1 2 3
a b c
Can any one help me how to do it
Thank youDATA: BEGIN OF S_STRUC,
KEY1,
KEY2,
KEY3,
KEY4,
FIRST TYPE CHAR10 VALUE 'FIRST',
SECOND TYPE CHAR10 VALUE 'SECOND',
THRIRD TYPE CHAR10 VALUE 'THIRD',
END OF S_STRUC.
DATA: ITAB LIKE S_STRUC OCCURS 0 WITH HEADER LINE.
DATA: V_INT TYPE INT4.
FIELD-SYMBOLS: <FS>, <FS1>.
DO 3 TIMES.
V_INT = SY-INDEX + 4.
ITAB-KEY1 = 'A'.
ITAB-KEY2 = 'B'.
ITAB-KEY3 = 'C'.
ITAB-KEY4 = 'D'.
ASSIGN COMPONENT V_INT OF STRUCTURE S_STRUC TO <FS>.
ASSIGN COMPONENT V_INT OF STRUCTURE ITAB TO <FS1>.
<FS1> = <FS>.
APPEND ITAB.
ENDDO.
LOOP AT ITAB.
WRITE: / ITAB.
ENDLOOP.
Regards
vasu -
How to use the internal table of the submitted program
Hi,
In the main program i have submitted a program and that program is running successfully and data is populated in to it_final, now i want to use this data populated internal table it_final in my main program.
Thanks,
Sudhakar.Hi,Mathew,
*& Report ZMB51 *
REPORT ZMB51 .
DATA LIST_TAB TYPE TABLE OF ABAPLIST.
DATA: BEGIN OF olist OCCURS 0,
filler1(1500) TYPE c,
END OF olist.
submit <b>RM07DOCS</b> EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LIST_TAB
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
TABLES
LISTASCI = oLIST
LISTOBJECT = LIST_TAB
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
BREAK-POINT.
write:/ sy-subrc.
ENDIF.
OLIST will contain the report output that you have executed but you need to tweak this internal table so that it can be used for further processing.The current example will get you MB51 output into OLIST,so change the program name to your program name at the SUBMIT statement and then try.
K.Kiran. -
How to know the internal table's last record
Dear friends,
Just I want to know my internal table last records, Ex:
I am having the records in my internal table like this:
Itab-col1
1
2
3
4
5
6
7
8
9
I want to know and print the last record, it maybe n number of records in my itab.
If I used at last within a loop but it dosn't work its taking the all *** in header.
How to know which is the last record in my internal table.
Thanks,
Sridhar.hi,
sridher reddy
1st describe ur table i.e read the number of entries in the table .....
data : count type i.
DESCRIBE TABLE <table name > LINES count.
READ TABLE <table name > INDEX count.
write : <table name>-<fieldname>.......... .
by this way u can print the last record of your table -
How to display the Internal table records in table format?
Hi Gurus,
I want to display my print prg internal table records in d appropriate form in a table format, give some solution
with regards
ThambeThere are lot many options to do that
one way is create template in the maikn window and define the line types according to your data cretae text and put your data in the text and go to output options and give the line type to be used . You can also select details option to have lines in your output.
similarly YOU CAN CREATE TABLE IN THE MAIN WINDOW FOR THIS YOU DONT NEED TO DEFINE THE LINE TYPES .
WHEN YOU ARE IN MAIN WINDOW RIGHT CLICK ON TABLE AND GO TO PATH
CREATE -> TABLE
-> TEMPLATE
REWARD IF USEFUL
Regards,
Nageswar -
How to export internal table and pass the internal table to another screen?
Hi,
I have a sql SELECT statement that select data from table into internal table. I would like to export out the internal table and pass to another screen and display the data in ALV list. How to export it out? I try but the error given was " The type of "OUT_SELECT_ITAB" cannot be converted to the type of "itab_result".
Another question is, how to pass the internal table that i export out from the function module to another screen?
Here is the code
==============================================================
FUNCTION ZNEW_SELECT_ZSTUD00.
""Local Interface:
*" IMPORTING
*" REFERENCE(IN_SELECT_YEAR) TYPE ZSTUD00-EYEAR
*" EXPORTING
*" REFERENCE(OUT_RESULT) TYPE CHAR9
*" REFERENCE(OUT_SELECT_ITAB) TYPE ZSTUD00
*& Global Declarations
DATA: itab TYPE ZSTUD00,
itab_result TYPE TABLE OF ZSTUD00.
*& Processing Blocks called by the Runtime Environment
itab-eyear = IN_SELECT_YEAR.
SELECT *
FROM ZSTUD00
INTO TABLE itab_result
WHERE eyear = IN_SELECT_YEAR.
IF sy-subrc = 0.
out_result = 'Success'.
OUT_SELECT_ITAB = itab_result.
ELSE.
out_result = 'Fail'.
ENDIF.
ENDFUNCTION.
===============================================================
Please advise. Thanks
Regards,
RaydenHi Nagaraj,
I try to change it in Tables tab page but it state that TABLES parameters are obsolete. when i "Enter". I try to "Enter" again. it seem to be ok but it stil give me the same error.
================================================================
FUNCTION ZNEW_SELECT_ZSTUD00.
""Local Interface:
*" IMPORTING
*" REFERENCE(IN_SELECT_YEAR) TYPE ZSTUD00-EYEAR
*" EXPORTING
*" REFERENCE(OUT_RESULT) TYPE CHAR9
*" TABLES
*" OUT_SELECT_ITAB STRUCTURE ZSTUD00
*& Global Declarations
DATA: itab TYPE ZSTUD00,
itab_result TYPE TABLE OF ZSTUD00.
*& Processing Blocks called by the Runtime Environment
itab-eyear = IN_SELECT_YEAR.
SELECT *
FROM ZSTUD00
INTO TABLE itab_result
WHERE eyear = IN_SELECT_YEAR.
IF sy-subrc = 0.
out_result = 'Success'.
OUT_SELECT_ITAB = itab_result.
ELSE.
out_result = 'Fail'.
ENDIF.
ENDFUNCTION.
===============================================================
regards,
Rayden -
Divide the internal table for months
How to divide the internal table itab for the months?
I have a field data in internal table itab and now i have need to divide itab in n table for months.
The data interval is max 4 months.
Sorry for my english.
ex. itab.
data: begin of itab occurs 0,
data LIKE vbak-erdat,
num_ord LIKE vbap-vbeln,
gruppo LIKE mara-labor,
end of itab.I have solved in this method:
SORT tab_gia DESCENDING BY data.
tmp_mese = tab_gia-data+4(2).
LOOP AT tab_gia.
IF tmp_mese EQ tab_gia-data+4(2).
IF flag1 = 'TRUE'.
MOVE tab_gia-data TO mese1-data.
MOVE tab_gia-gruppo TO mese1-gruppo.
MOVE tab_gia-tipo TO mese1-tipo.
MOVE tab_gia-matnr TO mese1-matnr.
MOVE tab_gia-giacenza TO mese1-giacenza.
APPEND mese1.
ENDIF.
IF flag2 EQ 'TRUE'.
MOVE tab_gia-data TO mese2-data.
MOVE tab_gia-gruppo TO mese2-gruppo.
MOVE tab_gia-tipo TO mese2-tipo.
MOVE tab_gia-matnr TO mese2-matnr.
MOVE tab_gia-giacenza TO mese2-giacenza.
APPEND mese2.
ENDIF.
IF flag3 EQ 'TRUE'.
MOVE tab_gia-data TO mese3-data.
MOVE tab_gia-gruppo TO mese3-gruppo.
MOVE tab_gia-tipo TO mese3-tipo.
MOVE tab_gia-matnr TO mese3-matnr.
MOVE tab_gia-giacenza TO mese3-giacenza.
APPEND mese3.
ENDIF.
IF flag4 EQ 'TRUE'.
MOVE tab_gia-data TO mese4-data.
MOVE tab_gia-gruppo TO mese4-gruppo.
MOVE tab_gia-tipo TO mese4-tipo.
MOVE tab_gia-matnr TO mese4-matnr.
MOVE tab_gia-giacenza TO mese4-giacenza.
APPEND mese4.
ENDIF.
ELSE.
* trovato un altro mese.
cnt = cnt + 1.
tmp_mese = tab_gia-data+4(2).
CASE cnt.
WHEN 2.
flag1 = 'FALSE'.
flag2 = 'TRUE'.
WHEN 3.
flag2 = 'FALSE'.
flag3 = 'TRUE'.
WHEN 4.
flag3 = 'FALSE'.
flag4 = 'TRUE'.
ENDCASE.
ENDIF.
ENDLOOP.
thanks!!!
Edited by: Alfonso Manzo on May 28, 2008 1:51 PM
Edited by: Alfonso Manzo on May 28, 2008 1:52 PM -
Getting the internal table of standard program to my custom program
Hi All,
I have a requirement in which i have to get the data from internal table ALV_ITAB from program HKBRO20. As this is the standard program, i have copied this program into Z custom program and using export parameter i am getting the data from internal table ALV_ITAB to my custom program (Using submit of the Z of the standard program). Can any one pls tell me whether the process i am following is correct if not pls tell me how to get the internal table from standard program to our custom program.
the process i am following
submit ZHBRO20 and return. IMPORT ALV_ITAB FROM MEMORY ID 'ABC'.
copied HBRO20 to ZHBRO20.
Thanks,
RajuHi,
you could also try
FIELD-SYMBOLS: <fc> .
CONSTANTS: c_table(21) VALUE '(PROGRAM_NAME)INTERNAL_TABLENAME[]'.
ASSIIGN (c_table) TO <fc>.
Depends on the process, of course.
Cheers,
Stefan.
Maybe you are looking for
-
I need help deauthorizing all computers
I have already tried to find the answer to this question in the FAQs, but the option to deauthorize all computers once I sign in on iTunes didn't show up. I do have 5 computers authorized at this point though because it says "5 out of 5 computers suc
-
PIR should not consume for the SubReq
Hi Guru's, Please help me how to configure the planning strategy for my below requirement. Currently i am procuring a HALB material thru subcontracting. This HALB is having BOM components. I need to send the BOM components to the vendor for assembly.
-
How to calculate number of samples ni scope for PXI-5922
Hi, I am streaming data from one of the channels from a PXI-5922. Assuming the resolution at 16bits/sample and the sampling rate at 10MS/s, i should be streaming at a data rate of 20MB/s So, if i stream for about 4 seconds, I should have collected 20
-
Comparison between Articulate Storyline and Presenter features as timeline and scripting
Hello everybody, we came to a critical point now, having to choose the best tool to develop e-learning courses together with a big company, that since now had developed hundred of e-learning courses on a flash-platform based platform. This company us
-
Help! Trying to export 1080p Timeline, But get 'glitches' on playback
I am Trying to export HD file that will play without 'glitches' The timeline plays beautifully--no problems. I use Adobe Exporter and I have tried MPEG2 Adobe profiles, standard and my own custom presets= glitches are still there, just at different p