Sending data from final internal table to application server in xml format
hi to all ,
can anyone send details about send data from final internal table to application server in xml format.right now i am able to download data to presentation server in xml format . love to here soon from all the abap gigs.
welcome to SDN.
are you using call transformation to convert itab to XML? the XML string is in which format?
convert it to xstring and then use the following code to store it in application server.
OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
TRANSFER XML_content TO FNAME.
CLOSE DATASET FNAME.
where fname is the path to the file name.
Regards
Raja
Similar Messages
-
How to move data from 2 internal table to 1 internal table
Can any body send me code that how to move data from 2 internal table into one internal table.
Moderator message : Read ABAP documentation. Thread locked.
Edited by: Vinod Kumar on Jun 13, 2011 11:45 AMHi Mohdarif92;
I don't know your full needs. But general method should be as below code.
Please check exam below code.
Best regards.
data : begin of gt_result.
... like mkpf-...
... like mkpf-...
... like mseg-...
... like mseg-...
end of gt_result
select *
into table gt_mkpf
from mkpf where ...
select *
into table mseg
from mseg where ...
loop at gt_mkpf.
loop at gt_mseg where ... = mkpf-...
move-corresponding gt_mkpf to gt_result.
move-corresponding gt_mseg to gt_result.
append gt_result
endloop.
endloop. -
How to get data from an internal table in some other program
I would like to get data from the internal table in the other program. When I using FM "LIST_FROM_MEMORY" to get the data, it doesn't work and the exception is not fount.
If any special code need in the other program, like write data to memory .
Many thx .
From Ross WangHi
<li>You need to have interaction if you want to use EXPORT/IMPORT statments.
<li>The internal tables in both programs must be same
<li>Program one ..Calling program
REPORT ZTEST_NOTEPAD.
DATA: BEGIN OF it_t001 OCCURS 0,
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
END OF it_t001.
START-OF-SELECTION.
SUBMIT ztest_notepad1 AND RETURN.
IMPORT it_t001 FROM MEMORY ID 'ZTEST_T100'.
LOOP AT it_t001.
WRITE:/ it_t001.
ENDLOOP.
<li>Program two ...Called program
REPORT ztest_notepad1.
DATA: BEGIN OF it_t001 OCCURS 0,
bukrs TYPE t001-bukrs,
butxt TYPE t001-butxt,
END OF it_t001.
START-OF-SELECTION.
SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001 UP TO 10 ROWS.
IF sy-dbcnt > 1.
EXPORT it_t001 TO MEMORY ID 'ZTEST_T100'.
ENDIF.
I hope that it gets you some idea.
Thanks
Venkat.O -
How to insert data from different internal table into a data base table
hi all,
I want to insert a particular field in an internal table to a field in a data base table.Note that the fields in the internal table and database table are not of the same name since i need to insert data from different internal tables.can some one tell me how to do this?
in short i want to do something like the foll:
INSERT INTO ZMIS_CODES-CODE VALUE '1'.
*INSERT INTO ZMIS_CODES-COL1 VALUE DATA_MTD-AUFNR .(zmis_codes is the db table and data_mtd is the int.table)REPORT ZINSERT.
tables kna1.
data: itab LIKE KNA1.
data lv_kUNAG LIKE KNA1-KUNNR.
lv_kuNAG = '0000010223'.
ITAB-kuNNR = lv_kuNAG.
ITAB-name1 = 'XYZ'.
INSERT INTO KNA1 VALUES ITAB.
IF SY-SUBRC = 0.
WRITE:/ 'SUCCESS'.
ELSE.
WRITE:/ 'FAILED'.
ENDIF.
Here lv_kunag is ref to kna1 kunnr passed in different name
In internal table .
Try and let me know if this logic dint work. -
How to download data from an internal table to a text
Hi All,
I want to download data from an internal table to a text file.
The fields should be pipe(|) separated. I have tried GUI_DOWNLOAD but it is not taking the field separator.
The sample of the desired data that i require should be this way:-
13456TR|M|COUP|MATERIAL|KGS
Thanks in advance.
Regards
Satish.Hi,
Try this..
REPORT zc1download message-id zc1dwnmsg.
*& Declaration Section for the Tables *
TABLES: makt.
*& Declaration Section for the Internal Tables
DATA: intab TYPE TABLE OF makt,
wa_intab LIKE LINE OF intab,
no_of_rec TYPE i,
count TYPE i.
DATA: BEGIN OF f_intab,
str(255) TYPE c,
END OF f_intab.
DATA: t_intab LIKE TABLE OF f_intab,
w_intab LIKE LINE OF t_intab,
temp(255) TYPE c.
FIELD-SYMBOLS: <f> TYPE ANY.
*& Selection ScreenSection for the file download
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: file TYPE rlgrap-filename MEMORY ID file,
tab RADIOBUTTON GROUP rad1 DEFAULT 'X',
others RADIOBUTTON GROUP rad1,
delimit TYPE c.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
IF file IS INITIAL. " check to ensure file.
MESSAGE i001.
EXIT.
ENDIF.
IF others = 'X'. " check to ensure delimiter.
IF delimit = ' '.
MESSAGE i002.
EXIT.
ENDIF.
ENDIF.
SELECT * FROM makt INTO TABLE intab.
IF tab = 'X'. " default delimiter tab is used
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = file
filetype = 'DAT'
mode = 'A'
TABLES
data_tab = intab
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 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.
ELSE. " If user defind delimiter is to be used
Counts the number of fields *
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE wa_intab TO <f>.
IF sy-subrc <> 0.
EXIT.
ELSE.
count = count + 1.
ENDIF.
ENDDO.
LOOP AT intab INTO wa_intab.
DO count TIMES. " Adding the delimiter in required places
ASSIGN COMPONENT sy-index OF STRUCTURE wa_intab TO <f>.
CONCATENATE temp delimit <f> INTO temp.
ENDDO.
SHIFT temp.
APPEND temp TO t_intab.
CLEAR temp.
ENDLOOP.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = file
filetype = 'ASC'
mode = 'A'
TABLES
data_tab = t_intab
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 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.
ENDIF.
WRITE:/ 'The Data has been tranfered to :', file.
Cheers
Kathir!~ -
How to read data from an internal table into a real table?
Hello experts,
I'm relatively new to ABAP and I'm trying to figure out how to read data from an internal table into a table that I created. I'm trying to use the RRW3_GET_QUERY_VIEW_DATA function module to read data from a multiprovider. I'm trying to read data from the e_cell_data and e_axis_data tables into a table that I've already created. Please see code below.
TABLES MULTITAB.
DATA:
query_name TYPE RSZCOMPID,
s_cubename TYPE RSINFOPROV,
t_cell_data TYPE RRWS_T_CELL,
t_axis_data TYPE RRWS_THX_AXIS_DATA,
t_axis_info TYPE RRWS_THX_AXIS_INFO,
wa_t_cell_data like line of t_cell_data,
wa_t_axis_data like line of t_axis_data,
w_corp_tab like line of t_cell_data.
s_cubename = 'CORP_MPO1'.
query_name = 'Z_corp_test'.
CALL FUNCTION 'RRW3_GET_QUERY_VIEW_DATA'
EXPORTING
i_infoprovider = s_cubename
i_query = query_name
i_t_parameter = query_string_tab
IMPORTING
e_cell_data = t_cell_data
e_axis_data = t_axis_data
e_axis_info = t_axis_info.
If anyone has any information to help me, I would greatly appreciate it. Thanks.Hi,
<li>Once you call the function module RRW3_GET_QUERY_VIEW_DATA, lets say data is available in the corresponding tables e_cell_data e_axis_data which you have mentioned.
<li>Modify your internal table defined for other purpose, with data from e_cell_data e_axis_data like below.
LOOP AT t_cell_data INTO wa_t_cell_data.
"Get the required data from t_cell_data.
MOVE-CORRESPONDING wa_t_cell_data TO it_ur_tab.
"Modify your internal table wih data
MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
ENDLOOP.
LOOP AT t_axis_data INTO wa_t_axis_data.
"Get the required data from t_cell_data.
MOVE-CORRESPONDING wa_t_axis_data TO it_ur_tab.
"Modify your internal table wih data
MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
ENDLOOP.
Thanks
Venkat.O -
Select Data from 2 intern tables
Hi Experts,
how I can select Data from 2 intern Tables into another intern table?
For Example:
My Result Table has the fields: mandt, user, ID, ID_Name.
My select table no. 1 has the fields mandt, XYZ (like A_Name), ID, ID_Name, ...
My select table no. 2 has the fields mandt, A_Name, User, ...
I want to search for all entries in select table no. 1 and 2. where are a_name have the same worth.
How I can select my Dates?
Regards,
Mikehii
you can do it by using for all entries and with READ statement ..do like follow code
IF i_marc[] IS NOT INITIAL.
SELECT matnr " Material Number
werks " Plants
lgort " Storage Location
FROM mard
INTO TABLE i_mard
FOR ALL ENTRIES IN i_marc
WHERE matnr EQ i_marc-matnr
AND werks EQ i_marc-werks
AND lgort IN s_lgort.
ENDIF. " IF i_mara[] IS NOT INITIAL
IF sy-subrc EQ 0.
LOOP AT i_output INTO wa_output.
READ TABLE i_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
wa_output-lgort = wa_mard-lgort.
MODIFY i_output FROM wa_output.
CLEAR wa_output.
ENDLOOP. " LOOP AT i_output
ENDIF. " IF sy-subrc EQ 0
regards
twinkal -
Filling dynamic internal table with data from other internal table
Hi Friends,
My problem is that i have already built a dynamic internal table
(class int_table->create) but now i want to fill it with data from other internal table.
The dynamic table column name and the field value of the data filled internal table are same, but how to access that column name, since i cant hard code it anyway.
Like if my werks field value is '8001'. I want to place it under the column 8001 of dynamic table, Can anybody help me in this regard?
Awarding points is not a problem for even giving a slight hint.
Best RegardsHi
See this
Dynamic internal table is internal table that we create on the fly with flexible column numbers.
For sample code, please look at this code tutorial. Hopefully it can help you
Check this link:
http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
Sample code:
DATA: l_cnt(2) TYPE n,
l_cnt1(3) TYPE n,
l_nam(12),
l_con(18) TYPE c,
l_con1(18) TYPE c,
lf_mat TYPE matnr.
SORT it_bom_expl BY bom_comp bom_mat level.
CLEAR: l_cnt1, <fs_dyn_wa>.
Looping the component internal table
LOOP AT it_bom_expl INTO gf_it_bom_expl.
CLEAR: l_cnt1.
AT NEW bom_comp.
CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
For every new bom component the material data is moved to
temp material table which will be used for assigning the levels
checking the count
it_mat_temp[] = it_mat[].
Component data is been assigned to the field symbol which is checked
against the field of dynamic internal table and the value of the
component number is been passed to the dynamic internal table field
value.
ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
<fs_check>.
<fs_check> = gf_it_bom_expl-bom_comp.
ENDAT.
AT NEW bom_mat.
CLEAR l_con.
ENDAT.
lf_mat = gf_it_bom_expl-bom_mat.
Looping the temp internal table and looping the dynamic internal table
*by reading line by line into workarea, the materialxxn is been assigned
to field symbol which will be checked and used.
LOOP AT it_mat_temp.
l_nam = c_mat.
l_cnt1 = l_cnt1 + 1.
CONCATENATE l_nam l_cnt1 INTO l_nam.
LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
ENDLOOP.
IF <fs_xy> = lf_mat.
CLEAR lf_mat.
l_con1 = l_con.
ENDIF.
Checking whether the material exists for a component and if so it is
been assigned to the field symbol which is checked against the field
of dynamic internal table and the level of the component number
against material is been passed to the dynamic internal table field
value.
IF <fs_xy> = gf_it_bom_expl-bom_mat.
ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
CLEAR l_con.
MOVE gf_it_bom_expl-level TO l_con.
CONCATENATE c_val_l l_con INTO l_con.
CONDENSE l_con NO-GAPS.
IF l_con1 NE space.
CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
CLEAR l_con1.
l_cnt = l_cnt - 1.
ENDIF.
<fs_check> = l_con.
l_cnt = l_cnt + 1.
ENDIF.
ENDLOOP.
AT END OF bom_comp.
At end of every new bom component the count is moved to the field
symbol which is checked against the field of dynamic internal table
and the count is been passed to the dynamic internal table field
value.
ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
<fs_check> = l_cnt.
INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
ENDAT.
ENDLOOP.
Reward if useful
Anji -
Can we get the data from two internal tables in ALV.
hi friends i would like to display the data using two internal tables using alv grid.please guide me.
Hi,
ALV would be having a specific layout say :
MATNR
MAKTX
QTY
Now, if you have two internal tables, then do they have a different structure. If they have different structures, then what kind of ALV layout you expect. The ALV output should be as per the structure of 1st or 2nd internal table.
If both internal table have same layout, then populate the data from 2nd internal table into 1st internal table and pass the 1st internal table ( it will have data of both internal tables) to ALV.
Best regards,
Prashant -
Read data from STATIC internal table during round trip in DO_PREPARE_OUTPUT
Dear Gurus
I have a requirement where I need to select some data from the database table BUT_HIER_NODE_D.
After SELECTING this data to an internal table (say ITAB), I am displaying this data in a table view. I was able to achive this functionality by putting some code in the DO_PREPARE_OUTPUT method.
Now according to my requirement, after the above data has been displayed on the screen initially, the user will click on any row. After clicking on a particular row, I need to capture the document number on that particular row and need to display all its child document numbers in a separate table. I am able to achive this functionality also.
Initially I am not sure of how to READ the same internal table (ITAB) again and again by avoiding the SELECT query upon each round trip (between CRM and Web).
After some research, I understand that I might have to use STATIC internal table to store the data during the
initial SELECT. This way, upon each round trip, I can READ the data from the same internal table.
My question: But now, when I tried to create a STATIC internal table in DO_PREPARE_OUTPUT, it is not allowing me to declare this table because DO_PREPARE_OUTPUT method is a INSTANCE method.
I didn't find any STATIC methods in the IMPL class of the view.
I would really appreciate if somebody can help me on how to proceed further.
Thanks
RajHi Bharathy / Adil / Masood
Thank you very much for the replies. I declared a static method inside the IMPL class and I was calling this method inside the DO_PREPARE_OUTPUT method. Looks like it is working fine for me...will comeback if I had any further issues.
Masood
As per my requirement, I need to Select the data into the internal table during the very first step, then I need to continuosly read the data from this internal table upon every round trip. So I am not sure if I would be able to use the method DO_INIT_CONTEXT. Because I need a method which will trigger upon each round trip and will also hold the data of this internal table. So right now, the only option for me is DO_PREPARE_OUTPUT method.
Plz let me know if am doing in the right way.
Thanks
Raj -
Export internal table to application server
hello all!
i would like to export the contents of an internal table to the appliation server. i tried via OPEN DATASET, but my itab contains not only character type data.
i do not want to copy all content into a parallel structure with all character type colums
do you know a way to export an internal table on application server, in a way that it is readable by ms excel?
thanks!Hi Matthias, i think that the only solution is using a parallel structure with all character type colums. Also use 'SAP_CONVERT_TO_CSV_FORMAT' to convert the internal table to csv format in order to be readable by ms excel.
Regards,
Andrez -
Problem in move the data to final internal table.
hi,
iam having 3 internal table.
1. g_t_vbrk (having data for vbrk table)
2. g_t_vbak (having data for vbak table)
3. g_t_likp (having data for likp table.)
actually i have written the loop like below .
LOOP AT g_t_vbrk.
READ TABLE g_t_vbfa WITH KEY vbeln = g_t_vbrk-vbeln.
IF sy-subrc = 0.
MOVE : g_t_vbrk-vbeln TO g_t_output_raw_header_data-vbeln,
g_t_vbrk-taxk1 TO g_t_output_raw_header_data-taxk1,
g_t_vbrk-taxk4 TO g_t_output_raw_header_data-taxk4,
g_t_vbrk-fkart TO g_t_output_raw_header_data-fkart,
g_t_vbrk-inco1 TO g_t_output_raw_header_data-inco1,
g_t_vbrk-inco2 TO g_t_output_raw_header_data-inco2,
g_t_vbrk-zterm TO g_t_output_raw_header_data-zterm,
g_t_vbrk-kunag TO g_t_output_raw_header_data-kunag.
READ TABLE g_t_vbak WITH KEY vbeln = g_t_vbfa-vbelv.
IF sy-subrc = 0.
MOVE : g_t_vbak-vkorg TO g_t_output_raw_header_data-vkorg,
g_t_vbak-auart TO g_t_output_raw_header_data-auart,
g_t_vbak-spart TO g_t_output_raw_header_data-spart,
g_t_vbak-vtweg TO g_t_output_raw_header_data-vtweg.
ENDIF.
APPEND g_t_output_raw_header_data.
endloop.
my question is i want to move likp table lfdat field to that final internal table with same loop.
i want to write move statement with same loop.
pls help with coding wise.
thanks
santhoshHi
In the loop.
SELECT VBELN FROM VBFA
INTO V_VBELN
WHERE VBELV = G_I_VBRK-VBELN
AND VBTYP_N = 'M'
AND VBTYP_V = 'J'.
Now READ from your LIKP internal table.
READ TABLE G_I_LIKP WITH KEY VBELN = V_VBELN.
Write your MOVE statements here.
Regards
Surya. -
SAP Query Display data from 2 internal tables
Hi ABAP Gurus,
I am developing a SAP Query.
I have created an infoset with the custom infotype 9050 and added the table ZPA9050 into the Infoset.
How do I input values to the ZPA9050 fields? A checkbox for making a Selection field is not available in the Query (SQ01)
For every pa9050 entry there exist multiple records of ZPA9050. I need to display the pa9050 fields in the 1st row and the corresponding zpa9050 fields in the subsequent rows.
Kindly advise how to accomplish this task.
A quick reply is highly appreciated.
Useful answers will be rewarded.
Thanks
SriramHi Deepika,
Your reqirement is to print data from the two internal tables ..and if u r not using interactive alv then u need to merge data into single internal table... if anycase u dont want to merge in the table itab as u told u can use another final internal table in which u can merge data from the two previous interal tables then u pass this final internal table to ur FM.
Thanks & Regards
Ashu Singh -
Need to update Ztable from final internal table
Hi,
ITAB = Final internal table has 9 fields : 1 2 3 4 5 6 7 8 9
Ztable = Ztable has 6 fields ex : 1 3 4 6 7 8
Structure of both Itab and Ztable are different.
I have data in the Final Internal table and needs to update data into a ztable.
If condition is true...
Modify ztable from itab
endif.
Any suggestions how I can update Ztable from the INternal table
Regards,
KittuHello,
First keep the loop to the final internal table then move all the records to the work area after moving to workarea then create another workarea for the Ztable then move only the field values which are there in Ztable then use modify keyword.
example
move:
y_wa_final_itab-kdauf to y_wa_zhr_item-vbeln,
y_wa_final_itab-kdpos to y_wa_zhr_item-posnr,
y_wa_final_itab-receiptno to y_wa_zhr_item-receiptno
modify zhr_item from y_wa_zhr_item -
Need to move the data to final internal Table
Hi all,
TYPES: BEGIN OF TY_MARA,
MATNR TYPE MATNR, " Material Number
ZZBASE_CODE TYPE ZBASE_CODE, " Base Code
END OF TY_MARA,
BEGIN OF TY_MAKT,
MAKTX TYPE MAKTX, " Material Description
END OF TY_MAKT,
BEGIN OF TY_MARC,
WERKS TYPE WERKS_D, " Plant
END OF TY_MARC,
BEGIN OF TY_QMAT,
ART TYPE QPART, " Inspection Type
END OF TY_QMAT,
BEGIN OF TY_MAPL,
MATNR TYPE MATNR, " Material
PLNTY TYPE PLNTY, " Task List Type
END OF TY_MAPL,
BEGIN OF TY_PLKO,
VERWE TYPE PLN_VERWE, " Task list usage
END OF TY_PLKO,
BEGIN OF TY_FINAL,
MATNR TYPE MATNR, " Material Number
MAKTX TYPE MAKTX, " Material Description
ZZBASE_CODE TYPE ZBASE_CODE, " Base Code
WERKS TYPE WERKS_D, " Plant
CLASS TYPE KLASSE_D, " Class Number
ART TYPE QPART, " Inspection Type
VERWE TYPE PLN_VERWE, " Task list usage
END OF TY_FINAL.
DATA: I_MARA TYPE STANDARD TABLE OF TY_MARA ,
I_MAKT TYPE STANDARD TABLE OF TY_MAKT ,
I_MARC TYPE STANDARD TABLE OF TY_MARC ,
I_QMAT TYPE STANDARD TABLE OF TY_QMAT ,
I_MAPL TYPE STANDARD TABLE OF TY_MAPL ,
I_PLKO TYPE STANDARD TABLE OF TY_PLKO ,
I_KLAH TYPE STANDARD TABLE OF TY_KLAH ,
I_FINAL TYPE STANDARD TABLE OF TY_FINAL ,
WA_MARA TYPE TY_MARA,
WA_MAKT TYPE TY_MAKT,
WA_MARC TYPE TY_MARC,
WA_QMAT TYPE TY_QMAT,
WA_MAPL TYPE TY_MAPL,
WA_PLKO TYPE TY_PLKO,
WA_KLAH TYPE TY_KLAH,
WA_FINAL TYPE TY_FINAL.
data: v_mtart type mara-mtart,
v_matnr type mara-matnr,
v_zzbase_code type mara-zzbase_code,
v_werks type t001w-werks,
v_beskz type marc-beskz.
selection-screen skip 1.
selection-screen begin of block b1 with frame title text-001.
select-options: s_mtart for v_mtart default 'halb' to 'zraw',
s_matnr for v_matnr,
s_zzbase for v_zzbase_code,
s_werks for v_werks obligatory,
s_beskz for v_beskz.
selection-screen end of block b1.
start-of-selection.
select matnr
zzbase_code
from mara into table i_mara
where mtart in s_mtart "Material Type
and matnr in s_matnr "Material
and zzbase_code in s_zzbase."Base Code
select maktx
from makt into table i_makt for all entries in i_mara
where matnr = i_mara-matnr.
select werks
from marc into table i_marc for all entries in i_mara
where matnr = i_mara-matnr
and werks in s_werks "plant
and beskz in s_beskz."Procurement Type
select art
from qmat into table i_qmat for all entries in i_mara
where matnr = i_mara-matnr
and werks in s_werks.
select matnr
plnty from mapl into table i_mapl for all entries in i_mara
where matnr = i_mara-matnr.
select verwe
from plko into table i_plko for all entries in i_mapl
where plnty = i_mapl-plnty.
this is my logic . i need to move this to final internal table i_final. how can do it. will anybody tell me with coding.
Thanks,Hi,
Include matnr field in all your type declaration and plnty in the ty_plko, type declaration.
loop at the internal table i_mara.
read the other tables with read statement.
assign the the required fields to the work area wa_final. Append it to i_final.
start-of-selection.
select matnr zzbase_code
from mara into table i_mara
where mtart in s_mtart "Material Type and matnr in s_matnr "Material and zzbase_code in s_zzbase. "Base Code
select matnr maktx
from makt into table i_makt
for all entries in i_mara where matnr = i_mara-matnr.
select matnr werks
from marc into table i_marc
for all entries in i_mara where matnr = i_mara-matnr and werks in s_werks "plant and beskz in s_beskz."Procurement Type
select matnr art
from qmat into table i_qmat
for all entries in i_mara where matnr = i_mara-matnr and werks in s_werks.
select matnr plnty
from mapl into table i_mapl
for all entries in i_mara where matnr = i_mara-matnr.
select plnty verwe
from plko into table i_plko
for all entries in i_mapl where plnty = i_mapl-plnty.
Loop at i_mara into wa_mara.
read table i_makt into wa_makt with key matnr = wa_mara-matnr.
(do this for all the internal tables.)
read table i_plko into wa_plko with key plnty = wa_mapl-plnty.
wa_final-MATNR = wa_mara-matnr.
wa_final-MAKTX = wa_makt-maktx.
wa_final-ZZBASE_CODE = wa_mara-ZZBASE_CODE.
wa_final-WERKS = wa_marc-werks.
wa_final-ART = wa_qmat-art.
wa_final-VERWE = wa_plko-verve.
append i_final from wa_final.
endloop.
Hope this helps.
Regards,
Dhasarathy. K
Maybe you are looking for
-
Getting error while configuring WebSphere application server in JDeveloper
Hi all, I have installed Oracle Jdeveloper 11g(11.1.1.5.1) and WebSphere application server 7 I am trying to create New Application server as "WebSphere" and entered following information. Host Name : wkstn90 SOAP Connector port: 8880 Server Name: se
-
Switching Ipod from PC to MAC format
Hi All, When I first purchased my Ipod I used it with a PC. I have made the move to a Mac (a Macbook) and would like to use that to sync my Ipod. Currently the Ipod is formatted for Windows. What do I have to do to get it to work with the mac? is it
-
Value select from nested table
CREATE TYPE test AS OBJECT ( test1 varchar2(10), test2 varchar2(10)); create or replace type test2 as table of test; two record are there within object type.then how i will select value from nested table.
-
applefans... the other day, my 9 year old (Mr. Pad Inc. - a budding developer) some how created a second hard drive on our iMac Flat Panel. I am guessing that the hard drive is now partitioned and the only way to return it to normal will be to erase
-
Email attachment filenames appear as "mail attachment".doc or "mail attachment."pdf
Hi, I have Mac OS 10.7.5, I've synchronised my hotmail/outlook address to Mail application. I have no issues with sending or receiving emails with attachments. The problem I'm having is that the filename of all attachments appear as "mail attachment.