How to write internal table data vertically . Records vertically.
Hi pals,
How to write internal table records vertically .
suppose the records are
a1 a2 a3
b1 b2 b3
we need to display
a1 b1
a2 b2
a3 b3
Thanks in advance.
balaji.T
Just check the code
DATA: BEGIN OF itab OCCURS 0,
f1 TYPE i,
f2 TYPE i,
f3 TYPE i,
END OF itab.
DATA pos TYPE i.
"Define your lines where you want to print here...
DATA line1 TYPE i VALUE 10.
DATA line2 TYPE i VALUE 12.
DATA line3 TYPE i VALUE 14.
itab-f1 = '1'.
itab-f2 = '10'.
itab-f3 = '100'.
APPEND itab.
itab-f1 = '2'.
itab-f2 = '20'.
itab-f3 = '200'.
APPEND itab.
itab-f1 = '3'.
itab-f2 = '30'.
itab-f3 = '300'.
APPEND itab.
itab-f1 = '4'.
itab-f2 = '40'.
itab-f3 = '400'.
APPEND itab.
loop at itab.
write : / itab-f1,itab-f2,itab-f3.
endloop.
LOOP AT itab.
pos = pos + 10.
SKIP TO LINE line1.
POSITION pos.
WRITE itab-f1.
SKIP TO LINE line2.
POSITION pos.
WRITE itab-f2.
SKIP TO LINE line3.
POSITION pos.
WRITE itab-f3.
ENDLOOP.
Similar Messages
-
How to Convert internal table data into text output and send mail in ABAP
Hi All,
Good Morning.
Taking a glance at a code that converts internal table data to an Excel file in ABAP. also checked how to send this excel to mailing list as attachment.
But thought of doing it without excel.
I mean, I have an internal table which contains fields of all types (character,integer,date,time). Since it is only around 4 to 5 rows in it (output),why to convert it to excel. not required!!. Instead I want to send this output to User's mails as Normal mail body with No attachments.
Could anybody please suggest me a way as to how to send internal table data as a mail ( not as an excel or PDF etc).
as of now my findings are, it is quite complex to convert internal table data to email (Text) format. but i believe if there is some way of doing it.
Best Regards
Dileep VThere's something I have used in the past where we send out information about failed precalculation settings (which are stored in internal table gt_fail)
notice we use gt_text as "mail body"
TRY.
* -------- create persistent send request ------------------------
gv_send_request = cl_bcs=>create_persistent( ).
* -------- create and set document -------------------------------
* create text to be sent
wa_line = text-001.
APPEND wa_line TO gt_text.
CLEAR wa_line.
APPEND wa_line TO gt_text.
LOOP AT gt_fail ASSIGNING <fs_fail>.
MOVE <fs_fail>-retry_count TO gv_count.
CONCATENATE text-002
<fs_fail>-setting_id
text-003
gv_count
INTO wa_line SEPARATED BY space.
APPEND wa_line TO gt_text.
CLEAR wa_line.
ENDLOOP.
APPEND wa_line TO gt_text.
wa_line = text-007.
APPEND wa_line TO gt_text.
* create actual document
gv_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = gt_text
i_length = '12'
i_subject = 'Failed Precalculation Settings!' ).
* add document to send request
CALL METHOD gv_send_request->set_document( gv_document ).
* --------- set sender -------------------------------------------
gv_sender = cl_sapuser_bcs=>create( sy-uname ).
CALL METHOD gv_send_request->set_sender
EXPORTING
i_sender = gv_sender.
* --------- add recipient (e-mail address) -----------------------
LOOP AT s_email INTO wa_email.
MOVE wa_email-low TO gv_email.
gv_recipient = cl_cam_address_bcs=>create_internet_address(
gv_email ).
CALL METHOD gv_send_request->add_recipient
EXPORTING
i_recipient = gv_recipient
i_express = 'X'.
ENDLOOP.
* ---------- set to send immediately -----------------------------
CALL METHOD gv_send_request->set_send_immediately( 'X' ).
* ---------- send document ---------------------------------------
CALL METHOD gv_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = gv_sent_to_all ).
IF gv_sent_to_all = 'X'.
WRITE text-004.
ENDIF.
COMMIT WORK.
* exception handling
CATCH cx_bcs INTO gv_bcs_exception.
WRITE: text-005.
WRITE: text-006, gv_bcs_exception->error_type.
EXIT.
ENDTRY.
with the following declarations
* TABLES *
TABLES:
adr6,
rsr_prec_sett.
* INTERNAL TABLES & WORK AREAS *
DATA:
gt_fail TYPE SORTED TABLE OF rsr_prec_sett
WITH UNIQUE KEY setting_id run_date,
gt_text TYPE bcsy_text,
wa_fail LIKE LINE OF gt_fail,
wa_line(90) TYPE c.
FIELD-SYMBOLS:
<fs_fail> LIKE LINE OF gt_fail.
* VARIABLES *
DATA:
gv_count(4) TYPE n,
gv_send_request TYPE REF TO cl_bcs,
gv_document TYPE REF TO cl_document_bcs,
gv_sender TYPE REF TO cl_sapuser_bcs,
gv_recipient TYPE REF TO if_recipient_bcs,
gv_email TYPE adr6-smtp_addr,
gv_bcs_exception TYPE REF TO cx_bcs,
gv_sent_to_all TYPE os_boolean.
* SELECTION-SCREEN *
SELECT-OPTIONS:
s_email FOR adr6-smtp_addr NO INTERVALS MODIF ID sel.
DATA:
wa_email LIKE LINE OF s_email. -
How to Populate Internal table data to Table Control in a Report Program
Dear All,
How to Populate Internal table data to Table Control in a Report Program? It is a pure report program with out any Module pool coding involved, which is just used to display data. Till now it is being displayed in a report. Now the user wants the data to be displayed in a table control. Could someone tell me how to go about with this.
Thanks in Advance,
Joseph ReddyIf you want to use a table control, you will need to create a screen.
In your report....
start-of-selection.
perform get_data. " Get all your data here
call screen 100. " Now present to the user.
Double click on the "100" in your call screen statement. This will forward navigate you to the screen. If you have not created it yet, it will ask you if you want to create it, say yes. Go into screen painter or layout of the screen. Use the table control wizard to help you along the process. It will write the code for you. Since it is an output only table control, it will be really easy with not a lot of code.
A better way to present the data to the user would be to give it in a ALV grid. If you want to go that way, it is a lot easier. Here is a sample of the ALV function module. You don't even have to create a screen.
report zrich_0004
no standard page heading.
type-pools slis.
data: fieldcat type slis_t_fieldcat_alv.
data: begin of imara occurs 0,
matnr type mara-matnr,
maktx type makt-maktx,
end of imara.
* Selection Screen
selection-screen begin of block b1 with frame title text-001 .
select-options: s_matnr for imara-matnr .
selection-screen end of block b1.
start-of-selection.
perform get_data.
perform write_report.
* Get_Data
form get_data.
select mara~matnr makt~maktx
into corresponding fields of table imara
from mara
inner join makt
on mara~matnr = makt~matnr
where mara~matnr in s_matnr
and makt~spras = sy-langu.
endform.
* WRITE_REPORT
form write_report.
perform build_field_catalog.
* CALL ABAP LIST VIEWER (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = fieldcat
tables
t_outtab = imara.
endform.
* BUILD_FIELD_CATALOG
form build_field_catalog.
data: fc_tmp type slis_t_fieldcat_alv with header line.
clear: fieldcat. refresh: fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material Number'.
fc_tmp-fieldname = 'MATNR'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '18'.
fc_tmp-col_pos = 2.
append fc_tmp to fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material'.
fc_tmp-fieldname = 'MAKTX'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '40'.
fc_tmp-col_pos = 3.
append fc_tmp to fieldcat.
endform.
Regards,
Rich Heilman -
How to access internal table data from webdynpro to Flex application.
Hi Connoisseur
The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
i tried to do pass internal table value to flex-datagrid.but its not work.
i would like to know
1.how to access internal table data from webdynpro to Flex application.
2.how to pass the internal table to flex-datagrid.
2.how to pass dynamically in ADOBE flex.
3. how to do Flex is receiving the wd context data?
4. how can we update WD context with FLEX data.
Ple give me sample example and step by step procedure.
Regards
laxmikanthHi Laxmikanth,
Please refer this...
Flash island: update complex type from flex
Cheers..
kris. -
How to convert internal table data to PDF format
HI,
I have an internal table data having one field with 255 chars. length.I want to send that intenal table data as attachemnt with external mail. i am thinking of converting that data into PDF format and use the FM to send the mail. How to convert internal table data to PDF format.
KishoreIn which format is your data in the internal table currently. Is it returned by a smartform/script or its just data fetched from some database table into an internal table. Since its obvious that the data should appear in the PDF with some Layout, you should be using smartform to format the data properly. See the Link
Smartform to PDF to EMAIL
This shows convertion of smartform to pdf and send it through email
Regards,
Abhishek -
How to download internal table data into xml file?
Hi,
Experts,
I have downloaded internal table data into XLS format using GUI_DOWNLOAD Function module, But i didn't Know how to download internal table data into XML format please post some ideas/inputs on this issue.
Thank you,
Shabeer ahmed.check this
data : gd_repid type sy-repid.
GD_REPID = SY-REPID.
DATA : L_DOM TYPE REF TO IF_IXML_ELEMENT,
M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
G_IXML TYPE REF TO IF_IXML,
W_STRING TYPE XSTRING,
W_SIZE TYPE I,
W_RESULT TYPE I,
W_LINE TYPE STRING,
IT_XML TYPE DCXMLLINES,
S_XML LIKE LINE OF IT_XML,
W_RC LIKE SY-SUBRC.
DATA: XML TYPE DCXMLLINES.
DATA: RC TYPE SY-SUBRC,
BEGIN OF XML_TAB OCCURS 0,
D LIKE LINE OF XML,
END OF XML_TAB.
data : l_element type ref to if_ixml_element,
xml_ns_prefix_sf type string,
xml_ns_uri_sf type string.
CLASS CL_IXML DEFINITION LOAD.
G_IXML = CL_IXML=>CREATE( ).
CHECK NOT G_IXML IS INITIAL.
M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
CHECK NOT M_DOCUMENT IS INITIAL.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'REPAIRDATA'
DATAOBJECT = IT_FINAL_LAST1[]
IMPORTING
DATA_AS_DOM = L_DOM
CHANGING
DOCUMENT = M_DOCUMENT
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
CHECK NOT L_DOM IS INITIAL.
W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
*Start of code for Header
* namespace
t_mnr = sy-datum+4(2).
CALL FUNCTION 'IDWT_READ_MONTH_TEXT'
EXPORTING
LANGU = 'E'
MONTH = t_mnr
IMPORTING
T247 = wa_t247
concatenate sy-datum+6(2)
wa_t247-ktx
sy-datum(4) into t_var1.
concatenate sy-uzeit(2)
sy-uzeit+2(2)
sy-uzeit+4(2) into t_var2.
clear : xml_ns_prefix_sf,
xml_ns_uri_sf.
l_element = m_document->get_root_element( ).
xml_ns_prefix_sf = 'TIMESTAMP'.
concatenate t_var1 t_var2 into xml_ns_uri_sf separated by space.
clear : t_var1,
t_var2,
t_mnr,
wa_t247.
l_element->set_attribute( name = xml_ns_prefix_sf
namespace = ' '
value = xml_ns_uri_sf ).
clear : xml_ns_prefix_sf,
xml_ns_uri_sf.
xml_ns_prefix_sf = 'FILECREATOR'.
xml_ns_uri_sf = 'SAP'.
l_element->set_attribute( name = xml_ns_prefix_sf
namespace = ' '
value = xml_ns_uri_sf ).
clear : xml_ns_prefix_sf,
xml_ns_uri_sf.
xml_ns_prefix_sf = 'CLAIMGROUP'.
xml_ns_uri_sf = '1'.
l_element->set_attribute( name = xml_ns_prefix_sf
namespace = ' '
value = xml_ns_uri_sf ).
clear : xml_ns_prefix_sf,
xml_ns_uri_sf.
xml_ns_prefix_sf = 'CLAIMTYPES'.
xml_ns_uri_sf = 'W'.
l_element->set_attribute( name = xml_ns_prefix_sf
namespace = ' '
value = xml_ns_uri_sf ).
*End of Code for Header
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = M_DOCUMENT
IMPORTING
XML_AS_STRING = W_STRING
SIZE = W_SIZE
TABLES
XML_AS_TABLE = IT_XML
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
LOOP AT IT_XML INTO XML_TAB-D.
APPEND XML_TAB.
ENDLOOP.
*Start of Code for File name
concatenate p_file
'\R'
'000_119481'
sy-datum+6(2) sy-datum+4(2) sy-datum+2(2)
sy-uzeit(2) sy-uzeit+2(2) sy-uzeit(2) '.xml' into p_file.
*End of Code for File name
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_SIZE
FILENAME = p_file
FILETYPE = 'BIN'
TABLES
DATA_TAB = XML_TAB
EXCEPTIONS
OTHERS = 10.
IF SY-SUBRC = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to transfer internal table data to Applicatiion Server in XML fromat.
how to transfer internal table data to Applicatiion Server in XML fromat.
Hi if u want to transfer from to application server using xml in
do like this,
v_xml_table is u r internal table,
and define li_xml_table as line of u r internal table
OPEN DATASET g_file FOR OUTPUT IN BINARY MODE .
LOOP AT v_xml_table INTO li_xml_table.
TRANSFER li_xml_table TO g_file .
ENDLOOP.
CLOSE DATASET g_file.
ENDIF.
<removed_by_moderator>
Regards,
Prasad.
Edited by: Julius Bussche on Jul 16, 2008 2:43 PM -
How to Convert internal table data into xml and xml data into internal tab
Hi Guys,
I have a requirement that i have to convert the internal table data into xml format and viceversa . for my requirement i came to know that i have to use Transformations concept. i done the converting the data from internal table into xml data by using standard Tranformations. My Question is
1) Can i use same Transformation to convert the xml data into abap internal table. if it is possible then how ???
2) Is it possible using the standard Transformation or I have to go for XSLT approach
Please help me out from this guys,
Thanks and Regards
KotiHi Koti,
This is possible. There is a link. With the help of this link you can convert ABAP data to XML and vice versa.
Link: http://www.heidoc.net/joomla/index.php?option=com_content&view=article&id=15:sapxslt&catid=22:sap-xslt&Itemid=31 -
How to convert internal table data into excel format?
Hi all,
I want to convert internal table data in excel format and then
send it as email attachment in workflow.
Please tell me how do i perform this.
Regards,
Arpita.Hi Arpita,
Try this sample code::
Send mail
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = 'your receiver mail id'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'EXL'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Hope it will help you.
Regards,
NIkita -
How to send internal table data through mail from report in foreground
hi all,
iam trying to convert the internal table data into excel format and sending it through mail by runnning the report in foreground.
mail is going sucessfully with excel format,but iam facing the problem in the excel format of the material column as follows:
the matrno shows the wrong format -2.63E+11 instead of displaying correct format-263215000000.
Pls suggest the alternative process for the above mentioned problem.
Thanks,
Sivagopal R.Hi Siva,
Try to copy 263215000000 in one of the cells of excel sheet and press enter.It will automatically convert into -2.63E+11 .
This means the default formatting of the excel sheet makes this happen.If you convert the format of the cell to "NUMBER" then u will get the required result.
But I doubt whether or not it is possible through ABAP programming.
Regards,
Vimal. -
How to download internal table data to .xlsx file ?
Hello All,
I am using SAP ECC 6.0. I need to download internal table data to .xlsx file.
I tried GUI_DOWNLOAD, all the data are getting transferred to the .xlsx file, but while opening I am getting the below error.
Excel cannot open the file "download.xlsx" because file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
Though Microsoft office 2007 is installed in my system.
Please help <removed by moderator>.
Edited by: Thomas Zloch on Oct 24, 2011 10:55 AMHi,
Please find the below code to download data into excel file.
DATA: ld_filename TYPE string,
ld_path TYPE string,
ld_fullpath TYPE string,
ld_result TYPE i.
Display save dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = ' '
DEFAULT_EXTENSION = 'XLS'
default_file_name = 'accountsdata'
INITIAL_DIRECTORY = 'c:\temp\'
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
user_action = ld_result.
Check user did not cancel request
CHECK ld_result EQ '0'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = ld_fullpath
filetype = 'ASC'
APPEND = 'X'
write_field_separator = 'X'
CONFIRM_OVERWRITE = 'X'
TABLES
data_tab = it_datatab[] "need to declare and populate
EXCEPTIONS
file_open_error = 1
file_write_error = 2
OTHERS = 3.
Thanks and Regards
Chitra -
How to covvert internal table data to XML file?
Hi,
Do u have material on ABAP with XML?
and how to convert internal table to XML?
Thanks and Regards,
ArpitaCheck below links:
XML DOM Processing in ABAP part II - Convert an XML file into an ABAP table using SAP DOM Approach.
Re: include a structure in a TYPES declaration
Thanks and Regards, -
How to save internal table data to file on local disk from smartforms?
Hi there,
I'm trying to save internal table data into .csv file on presentation server from within smartforms using GUI_DOWNLOAD function.
This function works fine from abap program, but when I call it from smartforms it does nothing. Form prints ok and there is no file created on local dick.
Is there a way to save smartforms internal table data to local disk?
Thanks in advance,
BaskeHi Jey,
Thanks for your prompt replay.
Unfortunately, Iu2019ve tried both your suggestions without success. Smartforms behaves just like in case of GUI_DOWNLOAD. There is no file saved on disk.
Do you have any other idea?
BR,
Baske -
How to download internal table data to excel in WebUI
Hi everyone,
I am trying to download the contents of an internal table to excel in CRM Web UI.
One way, would be to create a table view and use the export to excel button.
However, wish to avoid this and directly download using code.
Also tried converting to xstring and setting data in the response object. However, this works only when I execute the component directly from BSP_WD_CMPWB. In the UI framework however, when I click on custom button(for download), it navigates to a screen where the contents of string are shown directly on browser.
Is there any other way of doing this?
Thanks in advance.
Regards,
DeepakHi,
there are two ways to download excel from the webclient using table views. The first is a XML stream that is send to Excel directly. Only works for Excel 2003 and later. The second is the fall back to a .csv.
I do not know if for the second option a direct connection is established as mentioned in the last post or there is actually a file stream send to the client.
Anyway the SAP provides the excel download through a seperate webservice. Have a look at CL_CHTMLB_CONFIG_TAB_EXCEL_EXP->IF_HTTP_EXTENSION~HANDLE_REQUEST( ).
I suppose going the same direction with your excel download will work. This service opens a new download stream with the excel content... Maybe it is even possible to copy it and adjust it to your needs...
cheers Carsten -
How to read internal table data and use to retrive from other table.
Hi all,
I am trying to generate a report using ooabap.
In this scenario, I retrieved data from one standard table (zcust) and successfully displayed using structure 'i_zcust_final' ( i_zcust_final is similar structure of zcust).
Now I want to get some other data from other standard table (zpurch) using the data in i_zcust_final. How....???? I am unable to read data from i_zcust_final even i kept in loop.
I am attaching the code here.. even it too long, please look at the code and suggest me what to do.
code **************************
REPORT ZBAT_OOPS_REPORT1.
TABLES: ZCUST.
D E F I N I T I O N *****
CLASS BATLANKI_CLS DEFINITION.
PUBLIC SECTION.
DATA : ITAB_ZCUST TYPE STANDARD TABLE OF ZCUST,
I_ZCUST_FINAL LIKE LINE OF ITAB_ZCUST,
ITAB_ZCUST1 TYPE STANDARD TABLE OF ZCUST.
TYPES: BEGIN OF IT_ZPURCH,
CUSTNUM TYPE ZPURCH-CUSTNUM,
PURC_DOC TYPE ZPURCH-PURC_DOC,
VENDOR TYPE ZPURCH-VENDOR,
STATUS TYPE ZPURCH-STATUS,
PURC_ORG TYPE ZPURCH-PURC_ORG,
END OF IT_ZPURCH.
DATA : ITAB_ZPURCH TYPE TABLE OF IT_ZPURCH,
I_ZPURCH_FINAL LIKE LINE OF ITAB_ZPURCH.
METHODS: GET_ZCUST,
PRINT_ZCUST,
GET_ZPURCH.
ENDCLASS.
I N I T I A L I Z T I O N *****
SELECT-OPTIONS:S_CUSNUM FOR ZCUST-CUSTNUM.
INITIALIZATION.
S_CUSNUM-LOW = '0100'.
S_CUSNUM-HIGH = '9999'.
S_CUSNUM-OPTION = 'BT'.
S_CUSNUM-SIGN = 'I'.
APPEND S_CUSNUM.
CLEAR S_CUSNUM.
I M P L E M E N T A T I O N *****
CLASS BATLANKI_CLS IMPLEMENTATION.
METHOD GET_ZCUST.
SELECT * FROM ZCUST
INTO TABLE ITAB_ZCUST
WHERE CUSTNUM IN S_CUSNUM.
ENDMETHOD.
METHOD PRINT_ZCUST.
LOOP AT ITAB_ZCUST INTO I_ZCUST_FINAL.
WRITE:/ I_ZCUST_FINAL-CUSTNUM,
I_ZCUST_FINAL-CUSTNAME,
I_ZCUST_FINAL-CITY,
I_ZCUST_FINAL-EMAIL.
ENDLOOP.
ENDMETHOD.
METHOD GET_ZPURCH.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO CORRESPONDING FIELDS OF TABLE ITAB_ZPURCH
WHERE CUSTNUM EQ I_ZCUST_FINAL-CUSTNUM.
ENDLOOP.
LOOP AT ITAB_ZPURCH INTO I_ZPURCH_FINAL.
WRITE:/ I_ZPURCH_FINAL-CUSTNUM,
I_ZPURCH_FINAL-PURC_DOC,
I_ZPURCH_FINAL-VENDOR,
I_ZPURCH_FINAL-STATUS,
I_ZPURCH_FINAL-PURC_ORG.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
O B J E C T *****
DATA: BATLANKI_OBJ TYPE REF TO BATLANKI_CLS.
START-OF-SELECTION.
CREATE OBJECT BATLANKI_OBJ.
CALL METHOD:
BATLANKI_OBJ->GET_ZCUST,
BATLANKI_OBJ->PRINT_ZCUST,
BATLANKI_OBJ->GET_ZPURCH.
Can anyone suggest me..
Thanks in advance,
Surender.Hi Surendar..
There is mistake in the Work area specification in this method.
METHOD GET_ZPURCH.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO CORRESPONDING FIELDS OF TABLE ITAB_ZPURCH
<b>WHERE CUSTNUM EQ ITAB_ZCUST1-CUSTNUM.</b>
"Instead of I_ZCUST_FINAL-CUSTNUM.
ENDLOOP.
LOOP AT ITAB_ZPURCH INTO I_ZPURCH_FINAL.
WRITE:/ I_ZPURCH_FINAL-CUSTNUM,
I_ZPURCH_FINAL-PURC_DOC,
I_ZPURCH_FINAL-VENDOR,
I_ZPURCH_FINAL-STATUS,
I_ZPURCH_FINAL-PURC_ORG.
ENDLOOP.
ENDMETHOD.
Now it should work..
One more thing : From performance point of view you have to Replace that loop using FOR ALL ENTRIES . And avoid CORRESPONDING FIELDS. it will be slow.
This is the code.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
if ITAB_ZCUST[] IS NOT INITIAL.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO TABLE ITAB_ZPURCH
<b>for all entries in ITAB_ZCUST1</b>
<b>WHERE CUSTNUM EQ ITAB_ZCUST1-CUSTNUM.</b>
"Instead of I_ZCUST_FINAL-CUSTNUM.
ENDIF.
ENDLOOP.
<b>Reward if Helpful.</b>
Maybe you are looking for
-
RemoveEventListener in drag and drop parallax composition
Hello all, I have a question, one of my students is making a project with a horizontal parallax and he wants to add drag and drop functionality to this. It works, only when you start to drag the object (converted to symbol) shoots to the right out of
-
Recently my iPhone has displayed a padlock with an arrow surrounding it in the upper right corner and it seems that I can't view photos or text messages sideways. When you turn the phone sideways it does not change to view it in that setting. Any t
-
How does vendor determine if no info record is maintained for the material
how does vendor determine if no info record is maintained for the material
-
Hi Experts, My scenario is to access the HEADER element in the incoming SOAP Header and use it as a condition for Receiver determination. Can somebody give example of 1) XSLT / java code which can be used to access SOAP Header elements. 2) How use t
-
Updating Flex 2 to 3 will pay off?
Hi, Sorry, but I did not find any information about this. If I buy version 2 of Flex, migration to version will pay off? Thanks in advance for your answer. Regards, Dexys