Internal table in a form routine
Hi,
I have a problem when I try to use an internal table to pass it into a form/Perform subroutine.
Here is my code :
DATA: BEGIN OF i_table_exple OCCURS 0,
ncont TYPE char18,
cdmvt TYPE char1,
END OF i_table_exple.
perform test_form using i_table_exple.
form test_form using i_table like i_table_exple.
loop at i_table.
write : / i_table-ncont.
write : / i_table-cdmvt.
endloop.
endform.
when I try to activate it, I have an error : "i_table" is neither specified under "tables" nor is it defined as an internal table
I think the way I pass my table to the form is not correct, but I don't know how to deal with it.
Try the following code:
TYPES: BEGIN OF t_table_exple ,
ncont TYPE char18,
cdmvt TYPE char1,
END OF t_table_exple.
DATA : i_table_exple TYPE t_table_exple OCCURS 0 WITH HEADER LINE.
perform test_form tables i_table_exple.
form test_form table i_table like i_table_exple.
loop at i_table.
write : / i_table-ncont.
write : / i_table-cdmvt.
endloop.
endform.
Similar Messages
-
How to call driver program internal table in a form
how to call driver program internal table in a form? Given below is my code
TABLES: VBRK,VBAK,ADRC,KNA1,VBRP,VBAP,J_1IMOCOMP.
DATA: BEGIN OF IT_CUST_ADD OCCURS 0,
STREET LIKE ADRC-STREET,
NAME LIKE ADRC-NAME1,
POST_CODE LIKE ADRC-PSTCD1,
CITY LIKE ADRC-CITY1,
CUST_TIN LIKE KNA1-STCD1,
END OF IT_CUST_ADD.
DATA: BEGIN OF IT_IN_DA OCCURS 0,
VBELN LIKE VBRK-VBELN,
FKDAT LIKE VBRK-FKDAT,
END OF IT_IN_DA.
now suppose these are my internal table. what should i write in FORM INTERFACE (associated type)Hi Sashi, this will solve ur problem.
Check the below link.
REG:PEFORM IN SCRIPT
kindly reward if found helpful.
cheers,
Hema. -
Including the internal table in Srcript Form
Hi all
i am collecting all the data into an internal table in the print program of the Script, now i want to pass that internal table under the text element DELPOS. so my internal table contain item data, so i want every item to be printed on the formIt depends upon your requirement. Looks like this layout is related to Delivery.
Currently it is printing Item data such as Item no, Material, No of Box, Quantity, unit etc.
If you want to comment existing lines and call your internal table, you can do that or you can create a new text element and call the same in your program. Just make sure that why code mentioned is not going to work for you and if you comment that, it should not create any problem to any data printing in layout.
ashish -
Tables parameter at Form routines
Dear All!
I have heard that this version is obselete:
Form showMara tables itab_mara type mara.
Endform.
Can you pls say to me what the cuurent coorectly
version is to handle with tables at form routines.
rregards
sasyes it works
no prblem...
this is worarea
Form showMara tables itab_mara type mara.
Endform.
this is for table
Form showMara tables itab_mara[] type table mara.
Endform.
like that
for exact checking ...c the help
ok -
How to create internal table in Adobe form - SFP transaction?
How shd i create an internal table under Global data ???
Regards,
Gurmukh singhyou can create the inernal table using the table types.
assume you want to create the Inernal table of type SFLIGHT, then you can create in this way...under the global Defintions.
VARiABLE NAME Type Assignment Type name
IT_SFLIGHT TYPE SFLIGHT_TAB1
IT_VBAP TYPE VBAP_TT
you can populate these tables using the Initialization->Code Initialization.
for more details Check here..
https://www.sdn.sap.com/irj/sdn/adobe -
Assign internal table name passed through routines
Dear experts,
How can i pass the name of P_TAB in from fieldcat_init ?.
i call the method of an object(ob) of class .
If i call debugger on p_tab in form fieldcat_init ,i can see the data.
But how to assign it
wa_fieldcat-tabname = P_TAB.
I tried this but gives me dump.
CALL METHOD OB->printalv( exporting alv_data = t_excel ).
method printalv.
perform printing tables alv_data.
endmethod.
form printing tables p_tab like t_excel.
# PERFORM fieldcat_init tables p_tab USING gt_fieldcat .
PERFORM eventtab_build USING gt_events[].
PERFORM comment_build USING gt_list_top_of_page[].
PERFORM disp_rep tables p_tab.
endform.
FORM fieldcat_init tables p_tab USING p_gt_fieldcat .
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = P_TAB.
wa_fieldcat-seltext_m = text-001 .
wa_fieldcat-outputlen = 18.
wa_fieldcat-emphasize = 'C410'.
APPEND wa_fieldcat TO it_fieldcat.
ENDFORM.
Line with # needs clarification.
Edited by: aditya sharma on Jul 22, 2010 9:49 AMHi Aditya,
You described your "p_tab" in TABLES section
describe your form like that :
FORM fieldcat_init USING p_tab p_gt_fieldcat .
ENDFORM.
and give the name of your table to this subroutine
not the table itself :
PERFORM fieldcat_init USING 'ITAB' p_gt_fieldcat.
wrong : PERFORM fieldcat_init USING ITAB p_gt_fieldcat.
I hope it helps. -
Hello ABAP gutus,
i am using 10 form-routines to get some data, in all subroutines code is same, but i am passing different internal tables to all form-routines with USING, CHANGING parameters.
for example
perform get_header1 using itab changing jtab.
perform get_header2 using itab1 changing jtab1.
FORM get_header1 USING P_ITAB
CHANGING P_JTAB.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = r_alvtab
CHANGING
t_table = itab[].
CALL METHOD r_alvtab->get_columns
RECEIVING
value = r_col.
CALL METHOD r_col->get
RECEIVING
value = r_cols.
loop at r_cols into wa_col.
ref_col = wa_col-r_column.
CALL METHOD ref_col->get_medium_text
RECEIVING
value = lv_text.
jtab-header = lv_text.
APPEND jtab.
endloop.
endform.
FORM get_header2 USING P_ITAB
CHANGING P_JTAB.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = r_alvtab
CHANGING
t_table = itab1[].
CALL METHOD r_alvtab->get_columns
RECEIVING
value = r_col.
CALL METHOD r_col->get
RECEIVING
value = r_cols.
loop at r_cols into wa_col.
ref_col = wa_col-r_column.
CALL METHOD ref_col->get_medium_text
RECEIVING
value = lv_text.
jtab1-header = lv_text.
APPEND jtab1.
endloop.
endform.
as above i used 10 form-routines.but i passed different internal tables.after these subrotines i am using those internal table in function modules.
now my client wants me to maintain one form-routine instead of 10 form-routines.
Is it possible that? please tell me . its urgent
Regards
MaheshHello Naredran.
see the below code
perform get_header1 using it changing it1.
perform get_header1 using itab changing it2.
*& Form get_header1
text
-->P_IT text
<--P_IT1 text
FORM get_header1 USING P_IT
CHANGING P_IT1.
FIELD-SYMBOLS : <FS>.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = r_alvtab
CHANGING
t_table = p_it.
CALL METHOD r_alvtab->get_columns
receiving
value = r_col
CALL METHOD r_col->get
receiving
value = r_cols
loop at r_cols into wa_col.
ref_col = wa_col-r_column.
CALL METHOD ref_col->get_medium_text
receiving
value = lv_text.
assign IT1 to <FS>.
<FS> = lv_text.
append it1.
endloop.
ENDFORM. " get_header1
bellow error is coming while use the code which you said.
A USING reference parameter should not be used. Instead, define the
parameter as a USING-VALUE(...) or CHANGING parameter.
please let me know waht is wrong . -
Using internal tables in BI 7 Start routines
Hi All
I tried searching for using internal tables in a start routine in BI 7 could not find the right pointers.
This is what I am trying to do is the following:
In a DSO ZSD_O01 I have a sales order and sales order item number and this DSO also contains the Contract number and the contract Item number.
The DSO structure is as follows:
/BIC/AZSD_O0100
DOC_NUMBER
ITEM
CONTRACT
CITEMNUM
I want to read the data in this DSO into a internal table. But the key fields in this DSO is DOC_NUMBER and ITEM so I want to read this data into a internal table only for the first data package into the internal table. Thereafter I want to lookup into the internal table given the doc_number and ITEM to find the CONTRACT and CITEMNUM.
Can any of you kindly show me how to :
- Read data from a DSO into a internal table
- Read the internal table for the first data package
- How do I make the access in the internal table fast when my lookup in the internal table is not on the
DSO key columns but on a different key column
Appreciate your help
Thanks
KarenHi Karen ,
It will be helpful if you tell your requirement as the approach you suggested is not looks convincing .May be their is some easy way and we can suggest you better approach
-how to check for source_package = 1
You need to hard code it .
We decide package size at DTP level so you can declare a global variable .let say you have 50000 size of your package then use global variable as counter and read only when record_count is <= 50000 .
-how to declare the internal table so the values in it exists between different data packages
Declare a global table and select data into it .A global table retain data across the packages .
- The key on which I need to lookup in the internal table is not the key fields as in the DSO
Its ok .Let say you are doing lookup on A B and C field of DSO1 and the values may duplicate in your source .then you just need to read the internal table having data from DSO2 with key field A B C .
Better if you set them as semantic keys at DTP level so that all duplicate entries of A B C will appear in same package .
global Declarations
In your start routine you will have this following code :
TYPES:
tyt_SC_1 TYPE STANDARD TABLE OF tys_SC_1
WITH NON-UNIQUE DEFAULT KEY.
$$ begin of global - insert your declaration only below this line -
... insert your code here
$$ end of global - insert your declaration only before this line -
One question
Why you want to populate values for 1 source package only not for all ?This will be helpful to understand your requirement and may be we can fulfill it in some other manner .
Regards,
Jaya Tiwari -
Hi Experts,
I am not able to get the data in the adobe form from an internal table.
I need to put the data in individual fields in the adobe form.
I'm working on Adobe Interactive form developed in WDP ABAP.( I have successfully config the ADS in my server.)
Action:
1. There are 1 table in the Adobe Interactive form((Adobeform)created by the 'sfp' t-code.
a) create a interface with a structure(A_STRU).
b) create a form with the interface.
c) In the layout of the form, drag a table to the form.
d) Binding the table to the A_STRU.
e) Binding the fields of the table to the fields of the structure.
2. Create a view -
first_view in the WDP ABAP.
3. In the first_view, there is a Interactiveform ( named "adobe_form" ) to be binding the Adobe Interactive form (Adobeform).
4. Type the code in the wddoinit of the first_view for bindding the internal table to context of the adobe interface.
DATA lo_nd_z_php_form_pay TYPE REF TO if_wd_context_node.
DATA lo_nd_g_context TYPE REF TO if_wd_context_node.
DATA lo_el_g_context TYPE REF TO if_wd_context_element.
DATA ls_g_context TYPE wd_this->element_g_context.
navigate from <CONTEXT> to <Z_PHP_FORM_PAY> via lead selection
lo_nd_z_php_form_pay = wd_context->get_child_node( name = wd_this->wdctx_z_php_form_pay ).
g_context is the context interface of the adobe form.
navigate from <Z_PHP_FORM_PAY> to <G_CONTAIN> via lead selection
lo_nd_g_context = lo_nd_z_php_form_pay->get_child_node( name = wd_this->wdctx_g_context ).
binding the g_context to the form context.
lo_nd_g_context->bind_table( result_payslip ).
through the debug the program, I found 50 records in the result_payslip internal * * table .
5. run the wda, I find the nothing data to be displayed in the adobe form.
6. But I can transfer a string parameter from wda to adobe form. I don't know how to transfer data in the table?
I don't know how to config the table in the adobe form?
I hope to get the guide for step by step to solve the problem. Thanks a lot .
I hope to get some hints. Thanks a lot .
Pls help me out.
Thanks & Regards,
Taohi ,
I have similar difficulty.....
I Am putting data from internal table into Adobe form using ABAP web dynapro.
I am not able to see data in Adobe form though inernal table contains 14 records.
Also, i have been thr' WDR_TEST_ADOBE
but still not able to solve problem .
Can you help me? -
Internal table on Start Routine
Hello
I have 5 key figures. They have an standard routine with a select statement. Basically they have to read an external DSO and get some fields values.
As all of them have the same SELECT statement I think it would be better to replace this with a select in the Start Routine, in order to improve performance. But unfortunatelly I'm not an abap programmer.
How could this be replaced in the Start routine ?
select single EXRATEXACC DOC_CURRCY NETVAL_INV
into (h_rate, h_dcurr, h_inv)
from /bic/azsdbiio100
where BILL_NUM eq SOURCE_FIELDS-/BIC/ZREFDOC
and BILL_ITEM eq SOURCE_FIELDS-/BIC/ZREFDOCLN
and COMP_CODE eq SOURCE_FIELDS-COMP_CODE.
if sy-subrc ne 0. " Not found
select single EXRATEXACC DOC_CURRCY NETVAL_INV
into (h_rate, h_dcurr, h_inv)
from /bic/azsdbiio100
where DOC_NUMBER eq SOURCE_FIELDS-DOC_NUMBER
and S_ORD_ITEM eq SOURCE_FIELDS-S_ORD_ITEM
and COMP_CODE eq SOURCE_FIELDS-COMP_CODE.
if sy-subrc eq 0.
h_flag = 'X'. " Document found
endif.
else.
h_flag = 'X'. "Document found.
endif.
if h_flag = 'X'.
if h_dcurr ne SOURCE_FIELDS-CURRENCY.
if h_rate lt 0.
h_rate = h_rate * ( -1 ).
clear h_amount.
if h_inv ne 0.
h_amount = h_inv.
else.
h_amount = SOURCE_FIELDS-/BIC/ZG_AVV104 * h_rate.
endif.
elseif h_rate gt 0.
if h_inv ne 0.
h_amount = h_inv.
else.
h_amount = SOURCE_FIELDS-/BIC/ZG_AVV104 / h_rate.
endif.
else.
h_amount = SOURCE_FIELDS-/BIC/ZG_AVV104.
endif.
else.
h_amount = SOURCE_FIELDS-/BIC/ZG_AVV104.
endif.
RESULT = h_amount.
CURRENCY = h_dcurr.
endif.
endif.Hi,
what you need to do first is to define internal tables in the start routine for each individual routine with the key fields. So look at the different SELECT SINGLE statements and build up the internal table(s). So for the first one you need to define an internal table with fields BILL_NUM, BILL_ITEM, COMP_CODE (your key) and EXRATEXACC, DOC_CURRCY and NETVAL_INV. I don't know if you can combine the two select single statements, that will depend on if BILL_NUM is the same type of field as DOC_NUMBER.
After declaration of the internal tables you can fill the bales by doing a SELECT instead of select single INTO the internal table.
In the individual update rules you can do a READ TABLE (internal table) WITH KEY yyyyyy
In this way you only have to access the DB once per data package and read from the internal memory for each record, which will definitely improve performance.
Hope this helps! -
Adobe forms which has 3 internal tables
Hi.
I am developing a adobe forms which has 3 internal tables
1 u2013 multiple lines table
2- multiple lines item table
3 u2013 multiple lines item table
I want to pass the above 3 internal table to Adobe forms and print it.
Also the data records can be many in each internal table.
I want to display the contents one after other.
How to do.Whether one table or more same aproch. Follow this for each table you have. Within a "flowed" subfolder create a table with 1 row (heading, footer if needeed). Bind the entire table at the table level. Bind 'data' fields to the row fields. Make sure you indicate that the table and rows are to repeat for each item in table.
-
How to call Subroutines,Standard Text & using Internal Table in SmartForm
Hi all,
need help in the following areas.Its very urgent!
1.How to CAll Subroutines in Smart Forms
2.How to CAll Standard Text in Smart Forms
Situation:
We have an Internal Table T_SALES with all the data which am going to display in the smartform,How to retrive data from an internal table in Smart forms
Any Help in this direction would be highly appreciated.
Regards
RamuHi,
When you are using quantity or currency fields, you have to mentiong the reference fileds in a tab called CURRENCY/QUANTITY FILEDS in the GLOBAL DATA node.
Specifying a Currency or Quantity Reference
Use
In the ABAP Dictionary, you can assign a currency or quantity field to a table field. In the output of these fields, the system can then insert the relevant currency or unit:
· If the value field is in the same table as the corresponding currency or quantity field, the system recognizes the reference automatically, and formats the value field according to the currency or unit in the assigned field.
· If the value field is in a different table from the currency or quantity field, the system cannot recognize this reference automatically.
In the second case, you must indicate this reference to the system in the form, to ensure that the value field is formatted correctly.
Procedure
You want to assign a currency or quantity field in one table (for example, CURTAB) to a value field in another table (for example, VALTAB).
1. Create the reference to the currency field by entering the following values:
- Field Name: VALTAB-VALUE, if this is the value field of VALTAB that you want to display.
- Reference Field: CURTAB-CURRENCY, which is the currency field of CURTAB.
2. Under Data Type, specify whether the data type is a currency or quantity.
Result
In the output of the PDF-based print form, the system formats the value field VALTAB-VALUE according to the assigned value in the currency or quantity field of the global variable CURTAB-CURRENCY.
Thanks and Regards,
Bharat Kumar Reddy.V
Message was Added by: Bharat Reddy V
Message was Added by: Bharat Reddy V -
How to declare global internal table in smartform
Hi
i need internal table in smart form with type of tline .. tline is structure and when i declare it in global definition as lines like tline it creates a structre ... kindly help me out
Regards
AmmadThis error is coming becasue u have not created an work area which is of same type as tdline.
Just double click on the error and copy paste the code here.Error now is nin ur code.
Secondly lets my internal table is GT_TLINE.
I will declare a work are GWA_TLINE type TLINE.
then i can have
loop at gt_line into gwa_tline or
read table gt_tline into gwa_tline with key etc.
Regards,
Nabheet Madan -
Smartforms and its internal table
Hi All!
From the main program, I call the FM SSF_FUNCTION_MODULE_NAME
and later "call lf_fm_name" as below shown.
The generated FM name gets an "internal table" in the tables parameter.
And now how can I to treat now this internal table within smart forms?
Please can you sequential explain the treatment. How can I acces
these datas of this internal table in the smartforms
reagards
ilhan
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lv_pick_formname
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = lf_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
IF sy-subrc = 1.
MESSAGE e061.
ELSEIF sy-subrc = 2.
MESSAGE e062.
ELSEIF sy-subrc = 3.
MESSAGE e063.
ENDIF.
ENDIF.
CALL FUNCTION lf_fm_name
TABLES lt_ausgabe_data = lt_ausgabe_datawhat ever you pass from program to smartforms you need to declare in
GLOBAL INTERFACE -> Import parameter.(in the driver program export parameter). make sure u use the same name in the SMARTFORM GLOBAL INTERFACE - > import parameter.
for more about smartforms go thru these link
for Smartforms material
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Please check the tables TNAPR and TTXFP for Standard Smartforms.
See the note 595812: it explain how to download the preconfigured smartforms.
Detailed information can be accessed at the site:
http://service.sap.com/preconfiguredforms OR
http://service.sap.com/smb/development/preconfiguredforms.
To download preconfigured smartform package, please:
1. Go to http://service.sap.com/installations, select tab "download".
2. On the right hand side screen, locate navigation tree node
SAP Software Distribution Center->Download->Installations and Upgrades->
Entry by Application Group.
3. In the main window (right hand side), follow the path
SAP Best Practices->Best Practices for mySAP All-in-One-> PRECONFIGURED
SMART FORMS, you can find available preconfigured smartform versions.
regards,
Prabhu
reward if it is helpful -
Error in uploading excel sheet data into internal table
Dear all,
i am facing problem when uploading data from excel. i used KD_GET_FILENAME_ON_F4.i select the file and pass on to ALSM_EXCEL_INTO_INTERNAL_TABLE.and i get the ERROR....
Illegal type when transferring an internal table to a FORM. this is my code .
types : begin of ty_mm01,
matnr like rmmg1-matnr,
mbrsh like rmmg1-mbrsh,
mtart like rmmg1-mtart,
maktx like makt-maktx,
meins like mara-meins,
matkl like mara-matkl,
bismt like mara-bismt,
spart like mara-spart,
mtpos like mara-mtpos_mara,
end of ty_mm01.
data : tt_mm01 type standard table of ty_mm01,
wa_mm01 like TT_MM01.
data : t_bdcdata like standard table of bdcdata,
t_bdcmsgcoll like standard table of bdcmsgcoll.
constants: begcol TYPE i value 1 ,
begrow TYPE i value 1,
endcol TYPE i value 100,
endrow TYPE i value 32000.
selection-screen : begin of block bdc with frame.
parameter : tfile like rlgrap-filename obligatory.
selection-screen : end of block bdc.
at selection-screen on value-request for tfile.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = 'ZMM_MAT_MAS_BASIC_DATA'
DYNPRO_NUMBER = '1000'
FIELD_NAME = 'TFILE'
STATIC = 'X'
MASK = ',*.xls,'
CHANGING
FILE_NAME = tfile
start-of-selection.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = tfile
I_BEGIN_COL = begcol
I_BEGIN_ROW = begrow
I_END_COL = endcol
I_END_ROW = endrow
TABLES
INTERN = tt_mm01
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 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.
Thanks in advanceHi,
Check these FM : KCD_EXCEL_OLE_TO_INT_CONVERT
Report ZPSP_TEST.
data: bdc_DATA like bdcdata occurs 0 with header line,
mess_tab like bdcmsgcoll occurs 0 with header line.
DATA: BEGIN OF ITAB OCCURS 0 ,
tcnt TYPE i, "Table Counter &H0D
WERKS LIKE T001W-WERKS,
BNFPO LIKE EBAN-BNFPO,
MATNR LIKE MARA-MATNR,
MENGE LIKE EBAN-MENGE,
END OF ITAB.
start-of-selection.
PERFORM upload_data.
loop at itab.
perform bdc_dynpro using 'SAPMM06B' '0100'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-BSART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-BSART'
'NB'.
perform bdc_field using 'RM06B-LPEIN'
'T'.
perform bdc_field using 'EBAN-WERKS'
ITAB-WERKS.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'RM06B-EKGRP'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RM06B-BNFPO'
ITAB-BNFPO.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-MATNR(01)'
ITAB-MATNR.
perform bdc_field using 'EBAN-MENGE(01)'
ITAB-MENGE.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RM06B-EEIND'
record-EEIND_010.
*perform bdc_field using 'RM06B-LPEIN'
record-LPEIN_011.
*perform bdc_field using 'EBAN-EKGRP'
record-EKGRP_012.
*perform bdc_field using 'EBAN-BADAT'
record-BADAT_013.
*perform bdc_field using 'EBAN-FRGDT'
record-FRGDT_014.
*perform bdc_field using 'EBAN-PREIS'
record-PREIS_015.
*perform bdc_field using 'EBAN-WAERS'
record-WAERS_016.
*perform bdc_field using 'EBAN-PEINH'
record-PEINH_017.
*perform bdc_field using 'EBAN-REPOS'
record-REPOS_018.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE(02)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RM06B-BNFPO'
record-BNFPO_019.
*perform bdc_field using 'EBAN-MATNR(02)'
record-MATNR_02_020.
*perform bdc_field using 'EBAN-MENGE(02)'
record-MENGE_02_021.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'EBAN-MENGE'
ITAB-MENGE_023.
*perform bdc_field using 'RM06B-EEIND'
record-EEIND_024.
*perform bdc_field using 'RM06B-LPEIN'
record-LPEIN_025.
*perform bdc_field using 'EBAN-EKGRP'
record-EKGRP_026.
*perform bdc_field using 'EBAN-BADAT'
record-BADAT_027.
*perform bdc_field using 'EBAN-FRGDT'
record-FRGDT_028.
*perform bdc_field using 'EBAN-PREIS'
record-PREIS_029.
*perform bdc_field using 'EBAN-WAERS'
record-WAERS_030.
*perform bdc_field using 'EBAN-PEINH'
record-PEINH_031.
*perform bdc_field using 'EBAN-REPOS'
record-REPOS_032.
perform bdc_field using 'EBAN-TXZ01'
'BEARING 2"X2"'.
perform bdc_field using 'EBAN-MENGE'
'65'.
perform bdc_field using 'RM06B-EEIND'
'2005/01/03'.
perform bdc_field using 'RM06B-LPEIN'
'D'.
perform bdc_field using 'EBAN-EKGRP'
'M11'.
perform bdc_field using 'EBAN-BADAT'
'2005/01/03'.
perform bdc_field using 'EBAN-FRGDT'
'2005/01/03'.
perform bdc_field using 'EBAN-PREIS'
' 1,120.00'.
perform bdc_field using 'EBAN-WAERS'
'EUR'.
perform bdc_field using 'EBAN-PEINH'
'1'.
perform bdc_field using 'EBAN-REPOS'
'X'.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-TXZ01'
'DRILLING PIPE 10"'.
perform bdc_field using 'EBAN-MENGE'
'75'.
perform bdc_field using 'RM06B-EEIND'
'2005/01/03'.
perform bdc_field using 'RM06B-LPEIN'
'D'.
perform bdc_field using 'EBAN-EKGRP'
'M11'.
perform bdc_field using 'EBAN-BADAT'
'2005/01/03'.
perform bdc_field using 'EBAN-FRGDT'
'2005/01/03'.
perform bdc_field using 'EBAN-PREIS'
' 0.53'.
perform bdc_field using 'EBAN-WAERS'
'EUR'.
perform bdc_field using 'EBAN-PEINH'
'1'.
perform bdc_field using 'EBAN-REPOS'
'X'.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'RM06B-BNFPO'
perform bdc_field using 'BDC_OKCODE'
'&H3DBU'.
*perform bdc_field using 'RM06B-BNFPO'
CALL TRANSACTION 'ME51' USING BDC_DATA MODE 'A'.
endLOOP.
FORM upload_data.
*local variable declaration
DATA : lv_index TYPE i,
l_count TYPE i.
*local constants declaration
CONSTANTS:
lc_start_col TYPE i VALUE '1' ,
lc_start_row TYPE i VALUE '2' ,
lc_end_col TYPE i VALUE '256' ,
lc_end_row TYPE i VALUE '65536'.
*local field symbol declaration
FIELD-SYMBOLS : <lf_s>.
*loacal internal table declaration
DATA : li_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.
*refresh internal table for each loop
CLEAR: li_intern,
l_count .
REFRESH li_intern.
to upload the data in excel on the presentation server this function
module converts the data from excel file into an internal table
containing row no col no and value
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename &H3D 'Give file location here'
i_begin_col &H3D lc_start_col
i_begin_row &H3D lc_start_row
i_end_col &H3D lc_end_col
i_end_row &H3D lc_end_row
TABLES
intern &H3D li_intern
EXCEPTIONS
inconsistent_parameters &H3D 1
upload_ole &H3D 2.
checking for data in internal table
CHECK NOT li_intern[] IS INITIAL.
sorting internal table
SORT li_intern BY row col.
collecting data into an internal table
LOOP AT li_intern.
MOVE: li_intern-col TO lv_index.
lv_index &H3D lv_index + 1.
ASSIGN COMPONENT lv_index OF STRUCTURE itab TO <lf_s>.
MOVE : li_intern-value TO <lf_s>.
AT END OF row.
l_count &H3D l_count + 1.
itab &H3D l_count.
APPEND itab.
ENDAT. " at end of row
ENDLOOP. " loop at li_intern
Reg,
Siva
Edited by: Siva Prasad on Jun 1, 2009 8:41 AM
Edited by: Siva Prasad on Jun 1, 2009 4:25 PM
Maybe you are looking for
-
My pages documents looked blurry and I noticed that there is a checkbox on the app "Open in Low Resolution" which was checked. I unchecked it, restarted pages, and was happy with the result.
-
Consolitation - how to remove carrried balance
Hi, Someone knows how to remove the carried forward balance corresponding to the previous fiscal year ? I appreciate a lot any advice. Thanks, Jorge
-
Dear experts For Imported goods the Basic customs is calculated on certain percent of net value, what is normal percentage of net value is used for calculating the assessable value, please give some detail answer, from where we have to refer the
-
My itunes won't share its library
I have recently purchased a new laptop and wanted to transfer my library from one laptop to the other. After searching about I discovered home sharing so download itunes onto my new laptop and turned homesharing on for both laptops under the same app
-
have swithed no.2 hardisk to no.1 slot notebook = dv9880eo entertainmaent Vista 32 bit it comes up with failure and can not finish! any suggstions?