Itab problem
Hi Friends,
I had fetched the data from database & store it in gt_itab.
Now i m trying to read the multiple records by read table.
The statement is like
read table gt_itab with key vbeln = itab-vbeln.
but by using above statement i m getting the error the internal table gt_itab has no header line.
will u tell me how to solve this??
Hi Salil,
<b>Now i m trying to read the multiple records by read table.</b>
<u><b>READ statement cannot fetch multiple records but only a single record.</b></u>
The statement is like
read table gt_itab <b>into wa_tab</b> with key vbeln = itab-vbeln.
But this will return only a single record in wa_tab.
If you want multiple records,
LOOP AT ITAB-VEBLN.
read table gt_itab <b>into wa_tab</b> with key vbeln = itab-vbeln.
if sy-subrc eq 0.
Do the processing here
endif.
ENDLOOP.
Best regards,
Prashant
PS : Please reward all helpful answers
Similar Messages
-
Hi experts,
Iam working on smartforms to display INVOICE using
VF02>Billing document>Issue_Output to....
Here i need to display Material sales text.I got it into ITAB using Read text in the program lines.
Now, may problem is how to define ITAB globally <b>with header line?</b>
So that i can loop it and display the data.Any suggestions pls....
Reward guaranteed,
thanks,
kakiHi Kaki,
If you are using a program to pass value to smartform, you cannot use internal table with header line. For that you have to go to Interface and there in the tables tab, give the name of the internal table. Now define a structure in the Global Definitions.Now in the tables node (or in the loop node) ,loop internal table into structure. Now use this structure for displaying the values.
If you are not using a program, then you can use an internal table with header line as explained in the previous post. Now create the structure in the Global definitions . Now in the global definitions, go to Initialization tab and give the select statement to pass the value into the structure. NOw in the table node(or in the loop node), loop internal table into structure and use the structure to display the values.
You can refer to this link and view my post for more details.
declaring IT in smartform
Hope my point is clear.
Regards,
SP.
Message was edited by: Sylendra Prasad -
Hi
I must only have a header on first page
and after this header in the 1-st page must be have a table (with unknown size)
In second page must be yet only this long table without header.
And on the last page must be footer.
I done this but on the first page I have a table in 6cm of top page and on every page is it also but
in next pages must be in 1cm of top page.
How to do this?Hi,
You mean to say that if the header is 4 cm from top, in next page the table starts leaving the 4 cm header sapce.
In this case you can over lap the table window over the header window ONLY IN NEXT PAGE.
Eg. Header display settings on 1st page
Header coordinates:
1 cm from top width 4 cm
table window coordinated:
4cm from top width 8 cm
On next page:
Header coordinates:
1 cm from top width 4 cm
table window coordinated:
1cm from top width 8 cm
this will definitely work
regards,
Gaurav -
ERROR: -Type conflict when calling a function module
hi to all,
when iam executing the program in browser Type conflict when calling a function module error is showing, i have bind all the attribute correctly still iam getting error, WHEN I CLICK ON THE SEARCH BUTTON DATA IS NOT COMING TO MY TABLE ITAB1 plz help me....
DATA:
NODE_IP_SELECTION TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_IP_SELECTION TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_IP_SELECTION TYPE IF_PLANNING_HISTORY=>ELEMENT_IP_SELECTION ,
ITAB TYPE TABLE OF ZSL_PL_UPDATE1,
WA TYPE ZSL_PL_UPDATE1.
navigate from <CONTEXT> to <IP_SELECTION> via lead selection
NODE_IP_SELECTION = WD_CONTEXT->GET_CHILD_NODE( NAME = `IP_SELECTION` ).
get element via lead selection
ELEM_IP_SELECTION = NODE_IP_SELECTION->GET_ELEMENT( ).
get all declared attributes
ELEM_IP_SELECTION->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = STRU_IP_SELECTION ).
CALL FUNCTION 'ZBAPI_PL_UPDATE'
EXPORTING
GV_LIFNR = STRU_IP_SELECTION-LIFNR
GV_MATNR = STRU_IP_SELECTION-LIFNR
GV_GJAHR = ' '
GV_WEEK_LOW = STRU_IP_SELECTION-FROM_WEEK
GV_WEEK_HIGH = STRU_IP_SELECTION-TO_WEEK
IMPORTING
RETURN =
TABLES
GT_PL_UPDATE = ITAB
DATA:
NODE_PLANN_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_PLANN_NODE TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_PLANN_NODE TYPE IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE,
WA1 TYPE IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE,
ITAB1 TYPE TABLE OF IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE.
LOOP AT ITAB INTO WA.
MOVE-CORRESPONDING WA TO WA1.
APPEND WA1 TO ITAB1.
ENDLOOP.
navigate from <CONTEXT> to <PLANN_NODE> via lead selection
NODE_PLANN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = `PLANN_NODE` ).
CALL METHOD NODE_PLANN_NODE->BIND_TABLE
EXPORTING
NEW_ITEMS = ITAB1
SET_INITIAL_ELEMENTS = ABAP_TRUE
INDEX =
ENDMETHOD.CALL FUNCTION 'ZBAPI_PL_UPDATE'
EXPORTING
GV_LIFNR = STRU_IP_SELECTION-LIFNR
GV_MATNR = STRU_IP_SELECTION-LIFNR
GV_GJAHR = ' '
GV_WEEK_LOW = STRU_IP_SELECTION-FROM_WEEK
GV_WEEK_HIGH = STRU_IP_SELECTION-TO_WEEK
IMPORTING
RETURN =
TABLES
GT_PL_UPDATE = ITAB
Problem is here
check out the type GV_GJAHR whether it accepts string type.
thanks
sarbjeet singh -
Problem in uploading text file to itab
Hi experts,
I declared a itab with two fields which refers a a dB table fields.Then i created a excel file: In the firest column i placed entry for the first field
and in the second column i placed entry for the second field.Both fields i have taken from thatDB table.Then i saved that excel file as type text-tab delimited.Then i called GUI_UPLOAD.
So when exicute my pgm i see the contents in the itab as follows:
Field1 field2
kv_sub_area0 004#descvription by ravikumar.
But i should get like this:
Field1 field2
kv_sub_area0004 descvription by ravikumar.
Why # is coming and it is taking some characters from field1 to filed2.
I am using version 4.7 Actually field1 is of length 30 as per DB table.
If i reduce the length in the itab declaration then it is giving corect..
can any body tellme why this problem occurs?
Regardsin GUI_UPLOAD
mention as
FILE_TYPE = 'ASC'.
HAS_FIELD_SEPERATOR = 'X'.
if you provide the above both, i believe your problem will be solved.
that '#' special symbol is for horizantal tab.
regards
srikanth
Message was edited by: Srikanth Kidambi -
Help on File - itab - table problem
Good day!
My problem is this. I am suppose to create an ABAP program that would get the 2 inputs from the user. The table name as well as a filename. My program should be able to transfer the contents from the file to the table in their respective fields. Now, the file is tab-delimited. and I should transfer the contents to the respective tables. The file is I am testing right now has about a 1000 entries so for every 1 row in the file, it is equivalent to the fields in the table. ex.
CoCd DocumentNo S PLSTAT Period Reference ZZGRP BIZ_TYPE Doc. Type Crcy Document Header Text Pstng Date Cre.Date Last updte
2200 924 1 06 4000013407 ME AED INV.7800009952-BL30240499 06/02/2008 06/05/2008 06/05/2008
That's just one entry. It looks messy because it is crammed into this box. but in a text file it is actually per line. My code now looks like this.
REPORT ZISZT_UPL_PDPL .
*DATA DECLARATIONS *
TABLES: ZISZT_ZPDPLH, ZISZT_ZPDPLD.
PARAMETERS: tble_n(20) TYPE C OBLIGATORY,
file_n(20) TYPE C OBLIGATORY.
DATA: BEGIN OF zpdplh_tab OCCURS 100.
INCLUDE STRUCTURE ZISZT_ZPDPLH.
DATA: END OF zpdplh_tab.
DATA: FILE TYPE STRING.
FILE = file_n.
*UPLOAD FILE TO TABLE *
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILE
FILETYPE = 'DAT'
TABLES
DATA_TAB = zpdplh_tab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
OTHERS = 3.
LOOP AT zpdplh_tab.
WRITE zpdplh_tab-BUKRS.
ENDLOOP.
The Loop is just to test if my internal table is getting the contents of the file. But it seems that it only gets one line. How do i fix this? Also, am I doing the right thing? Creating an internal table to transfer the files to then I would transfer it to the table in the database. Is this right? Or is there an easier way, I am suppose to transfer its contents to the table inputted by the user. Is there possible to implement some error cehcking here as well? Thanks in advance for the ideas and adivces,hi there check this ..
DATA: BEGIN OF zpdplh_t OCCURS 100.
INCLUDE STRUCTURE ZISZT_ZPDPLH.
DATA: END OF zpdplh_t.
data: zpdplh_tab type standard table of zpdplh_t.
and one more thing.. gui_upload will not work in background.. so check if it might be an issue later..
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = PATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17. -
Dynamic ITAB copy problem with field type P
Hello everyone
I need to copy the structure of an internal table that is pass by reference into a method.
Actually everything is fine else than the field type P with decimal is not created properly in the new itab.
Scenario:
An internal table is pass by reference to a method. We need to trait the data without modifying the original table. The Idea is to copy the structure and the data of the referenced internal table into an internal table created dymanically in the method.
Here is what I did and working fine when there are no field of data type "CURR".
Extract the structure of the reference data.
Create a dynamic internal table.
So far so good. Everything seams to work fine. BUT
when I am trying to copy the data from the reference table to the just created internal table the field with data type "CURR" doesn't work.
Here is my example:
FIELD-SYMBOLS: <FS_TABLE> TYPE STANDARD TABLE,
<TMP_TABLE> TYPE STANDARD TABLE,
<LS_TMP_TABLE> TYPE ANY,
<LS_TABLE> TYPE ANY,
<LS_VALUE> TYPE ANY.
DATA: lt_data TYPE STANDARD TABLE OF vbak,
ls_data LIKE LINE OF lt_sortfield,
ref_data TYPE REF TO data,
l_structure TYPE REF TO DATA,
lv_ltname TYPE string.
select * from vbak UP TO 10 rows INTO CORRESPONDING FIELDS OF TABLE lt_data.
* --- Assign the reference variable to the table
* ---- Only use to simulate a parameter that is assign to a reference to a internal table
unassign <FS_TABLE>.
lv_ltname = 'lt_data[]'.
ASSIGN (lv_ltname) to <FS_TABLE>.
GET REFERENCE OF <FS_TABLE>[] INTO ref_data.
* --- Assign the reference to the field-symbol
UNASSIGN <FS_TABLE>.
ASSIGN ref_data->* TO <FS_TABLE>.
* --- Create a working area for the reference table to a field-table
CREATE DATA l_structure LIKE LINE OF <FS_TABLE>.
ASSIGN l_structure->* TO <LS_TABLE>.
* --- Retrieve the structure of the field-symbol pointing to the internal table
DATA: lr_tabledescr TYPE REF TO cl_abap_tabledescr, " Internal Table description
_r_structdescr TYPE REF TO cl_abap_structdescr.
lr_tabledescr ?= cl_abap_tabledescr=>describe_by_data( <fs_table> ).
_r_structdescr ?= lr_tabledescr->get_table_line_type( ).
* --- Read internal table structure to create dynamic internal table
data: ls_struc like LINE OF _r_structdescr->components,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat.
* --- Why the field (component) NETWR length is now 8 instead of 15?
LOOP AT _r_structdescr->components into ls_struc.
clear xfc.
xfc-fieldname = ls_struc-name .
xfc-datatype = ls_struc-type_kind.
xfc-inttype = ls_struc-type_kind.
xfc-intlen = ls_struc-length.
xfc-decimals = ls_struc-decimals.
append xfc to ifc.
ENDLOOP.
DATA: dy_table type ref to data,
* --- Create dynamic internal table
call method cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = ifc
IMPORTING
ep_table = dy_table.
* --- assign reference internal table to Field-symbol
assign dy_table->* to <tmp_table>.
unassign <ls_tmp_table>.
DATA: ls_tmp_struc type REF TO DATA.
CREATE DATA ls_tmp_struc like LINE OF <tmp_table>.
ASSIGN ls_tmp_struc->* TO <ls_tmp_table>.
Loop at <fs_table> INTO <LS_TABLE>.
MOVE-CORRESPONDING <ls_table> TO <ls_tmp_table>.
APPEND <ls_tmp_table> TO <tmp_table>.
ENDLOOP.
* <fs_table>-netwr length is 15
* <ls_tmp_table>-netwr length is 8
* ??????????? Why the length is different?
* ??????????? It should a structure copy and have the
* ??????????? same length
I use VBAK as example, and the field NETWR is using data type "NETWR_AK" where it us a data type "CURR" with length 15 and decimal 2.
When reading the structure, the method get_table_line_type of the class cl_abap_tabledescr return a length of 8 instead of 15.
Any idea how to get the exact structure of a variable that is refering to a data type?
Regards
DanielHello Everyone
Thank you for your replies.
I think I didn't explain myself clearly.
My goal is to be able to create an exact structure copy of a "Type ref to data" into a new internal table that is not defined yet.
Example:
A method contain a parameter that is a ref to DATA type.
That parameter is refering to an internal table from the calling program.
Now I want to create an internal table into the method where this one will be an exact structure copy of the parameter.
So, lets put some name here.
parameter: ip_data type ref to data.
FIELD-SYMBOLS: <FS_REF_DATA> TYPE STANDARD TABLE,
<FS_CP_DATA> TYPE STANDARD TABLE.
ASSIGN ip_data->* TO <FS_REF_DATA>.
" some code to assign the same structure to <FS_CP_DATA> from <FS_REF_DATA>
" than copy the data from <FS_REF_DATA> to <FS_CP_DATA>.
<FS_CP_DATA> [ ] = <FS_REF_DATA> [ ]. " This is working if no type P with decimal exist into the structure
" Than I can play with the data of <FS_CP_DATA> without modifying the data of <FS_REF_DATA>.
My problem would be solved if I can create dynamically an internal table that has an exact structure copy of the passed parameter.
Regards
Daniel -
Insert ITAB INDEX SY-TABIX Problem
Hi Experts,
I have a problem in my report.
Please look into the code.
loop at li_basez980.
read table i_z980 with key spmon = l_spmon
matnr = li_basez980-matnr
kunnr = li_basez980-kunnr
werks = li_basez980-werks
vkorg = li_basez980-vkorg binary search.
if sy-subrc ne 0.
i_z980-spmon = l_spmon.
i_z980-matnr = li_basez980-matnr.
i_z980-kunnr = li_basez980-kunnr.
i_z980-werks = li_basez980-werks.
i_z980-vkorg = li_basez980-vkorg.
i_z980-basme = li_basez980-basme. " 8/6/07
i_z980-waers = c_waers.
i_z980-cpudt = v_datum.
i_z980-cputm = v_uzeit.
i_z980-znetsalekg = 0.
i_z980-znetsalevl = 0.
insert i_z980 index sy-tabix.
clear i_z980.
endif.
endloop.
When run my report in Foreground it runs fine. But when i run the same report in Background job gets cancelled when the index reaches to 228984 once 230070 once and 230104 once at insert statement i.e " insert i_z980 index sy-tabix." . I found this by debugging the Job.
Please help me if you know the solution.
Regards,
Ravikumar P
Edited by: Ravikumar P on Mar 30, 2010 4:40 PMHi,
This is happening because after read you inserting the records when sy-surbc <> 0. At that time did you check the sy-tabix value. This value is comming correctly. You directly append the same.
loop at li_basez980.
read table i_z980 with key spmon = l_spmon
matnr = li_basez980-matnr
kunnr = li_basez980-kunnr
werks = li_basez980-werks
vkorg = li_basez980-vkorg binary search.
if sy-subrc ne 0.
i_z980-spmon = l_spmon.
i_z980-matnr = li_basez980-matnr.
i_z980-kunnr = li_basez980-kunnr.
i_z980-werks = li_basez980-werks.
i_z980-vkorg = li_basez980-vkorg.
i_z980-basme = li_basez980-basme. " 8/6/07
i_z980-waers = c_waers.
i_z980-cpudt = v_datum.
i_z980-cputm = v_uzeit.
i_z980-znetsalekg = 0.
i_z980-znetsalevl = 0.
insert i_z980 index sy-tabix.
clear i_z980.
endif.
endloop. -
Loop at itab in a Smarform problem
Hi Guys,
Right now i'm developing my first OO program that calls a Smartform, but I'm having the following issue.
I call a method exporting the internal table that i want to pass to the SF, but when i want to make a loop statement in the SF I get a dump. I asked some friends and they told me that right now is obsolete the table statement, so i declare in the SF in the importing tab and then declare it in the exporting part of the FM that calls the SF.
Now when i try to activate the SF i guet the following error: "You may only read from table "IT_GRID1". - reading.".
so my question is, how can i declare my itab in order to be able to add a loop statement?.
Regards,
EricHi Subramanian,
At first I did what you suggest, but for a reason that I can`t explain, when the loop begins I always get a dump. The only way that i could make the dump disappear was by replacing the name of the parameter that I receive from the method for the original table.
Example:
" I call the method in the main method.
lcl_reporte_auditoria=>llamar_sf( EXPORTING
table = it_sf ).
METHOD llamar_sf.
* Llamar al Formulario
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZQM_RPT_AUDITORIA_LLANTA_VERDE'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯*
* CONFIGURO LOS OPARAMETROS DE SALIDA PARA Q NO APAREZACA *
* LA CAJA DE DIALOGO DE LA IMPRESION *
wa_ssfctrlop-device = 'PRINTER'.
wa_ssfctrlop-langu = sy-langu.
wa_ssfctrlop-replangu1 = sy-langu.
wa_ssfctrlop-replangu2 = sy-langu.
wa_ssfctrlop-replangu3 = sy-langu.
wa_ssfctrlop-no_dialog = 'X'. "SIN DIALOGO
wa_ssfctrlop-preview = 'X'. "VISTA PREVIA
wa_ssfcompop-tddest = 'LOCL'. "LOCAL AL PC
wa_ssfcompop-tdimmed = 'X'. "IMPRESION IMEDIATA
CALL FUNCTION fm_name
EXPORTING
control_parameters = wa_ssfctrlop
output_options = wa_ssfcompop
user_settings = ''
TABLES
it_grid1 = table
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDMETHOD. "llamar_sf
In this case I get a dump as soon as the SF reach the loop statement. If I change the
TABLES
it_grid1 = table
for
TABLES
it_grid1 = it_sf
The dump doesn't appear anymore.
The dump says: MOVE_TO_LIT_NOTALLOWED_NODATA
Assignment error: Overwriting a protected field.
At that moment a friend told me that the table statement was obsolete in OO programing, and encourage me to change it for a exporting parameter. This is the reason why i'm doing it, please anyone tell me is that affirmation is correct. Otherwise, could someone explain me why i'm getting that error when i export the table that i'm receiving in the method call.
Regards,
Eric
Message was edited by:
Eric Hernandez Pardo -
Unique problem Screen is not Getting data populated from BDC_DATA itab
Hi Gurus,
I have an unique problem, I have an custom transaction (module pool) and which first runs an ALV report displays an QM Records, There is an command button at the top of the report to create new defect, where i provide the Material Number, Supplier and Defect Code, and then if i press create it should navigate to standard transaction QM01 and It should create a new defect code.
Issue:
The recording runs fine till providing Material Number, Supplier and Defect Code of ZTCODE when it navigates to QM01, the whole executions just stops, i dont know why it is moving ahead. If i try to skip and come out of standard transaction also no improvement and all manually i should come out.
Comparision with recording Made in ZTCODe and QM01.
If i record the same activity directly with QM01 and if i try to run the recording, it runs perfectly.
if i am trying to record it through Z module pool where it will navigate to standard transaction code QM01, it stops when it reaches QM01, i am getting this error. i dont know why.
I have attached the code for your reference, kindly suggest me what can be the problem.
MY CODE:
perform bdc_dynpro using 'ZQRPCCOMEX_NEW_SWCB' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=FC_DEFC'.
perform bdc_field using 'P_VAR'
'/VEHICLEPROJ'.
perform bdc_field using 'BDC_CURSOR'
'S_NITG-LOW'.
perform bdc_field using 'S_QMDAT-LOW'
'03.09.2010'.
perform bdc_field using 'S_QMDAT-HIGH'
'03.03.2011'.
perform bdc_dynpro using 'ZQRPCCOMEX_NEW_SWCB' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=ONLI'.
perform bdc_field using 'P_VAR'
'/DEFECT_CODE'.
perform bdc_field using 'BDC_CURSOR'
'S_NITG2-LOW'.
perform bdc_field using 'S_NITG2-LOW'
'G22C'.
perform bdc_dynpro using 'SAPLSLVC_FULLSCREEN' '0500'.
perform bdc_field using 'BDC_OKCODE'
'=NEW_DC'.
perform bdc_dynpro using 'ZQRPCCOMEX_NEW_SWCB' '9507'.
perform bdc_field using 'BDC_CURSOR'
'W_SCR_REFNUM'.
perform bdc_field using 'BDC_OKCODE'
'=OK'.
perform bdc_field using 'W_SCR_MATNR'
'G22C'.
perform bdc_field using 'W_SCR_LIFNR'
'220947-00'.
perform bdc_field using 'W_SCR_REFNUM'
'C_DEF_11'.
it is not executing from here these screens belongs to QM01, it stops the whole execution
perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RQM00-MAWERK'.
perform bdc_field using 'RQM00-MAWERK'
'CTT'.
perform bdc_field using 'VIQMEL-QMCOD'
'0120'.
perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE'
'=BUCH'.
perform bdc_field using 'BDC_CURSOR'
'RQM00-MAWERK'.
perform bdc_field using 'RQM00-MAWERK'
'CTT'.
perform bdc_field using 'VIQMEL-QMCOD'
'0120'.
perform bdc_dynpro using 'SAPLSLVC_FULLSCREEN' '0500'.
perform bdc_field using 'BDC_OKCODE'
'=&F12'.
perform bdc_dynpro using 'ZQRPCCOMEX_NEW_SWCB' '1000'.
perform bdc_field using 'BDC_OKCODE'
'/EECAN'.
perform bdc_transaction using 'ZM11'.
The screen gets hanged up in the QM01 screen and where the mandatory fields are not getting populated and thats it execution is not happening at any screens if i am trying to come out of transaction.
Assumption - Correct me if iam wrong.
There can be complication while calling a Ztcode (module Pool) which in turns calls a Standard Tcode.
Thanks & Regards,
S.SaravananHI,
Check the recording i think the recording does not contain the initial screen i.e SAPLIQS0 200.
Re record the bdc or just add the initial screen in the BDC
perform bdc_dynpro using 'SAPLIQS0' '200'.
perform bdc_field using 'RIWO00-QMART' 'Q!' " What ever notification type u have
perform bdc_field using 'BDC_OKCODE' '/00'.
This will sove ur problem .
Regards,
Madhukar Shetty -
Problem in select statment & loop of itab.
Hi all,
I am having on ITAB1 for, ex which is having five line items or more .
iam also using select statment SINGLE statment for 7 times ,to select values for
different data base table.
for ex,
loop at itab.
1---> SELECT SINGLE Z_CTRY_ORIG INTO LS_PSHDESN-Z_CTRY_ORIG FROM ZLE_PART_MST
WHERE WERKS = ITAB1-LGNUM
AND MATNR = ITAB1-MATNR .
2---
3---
4---
endloop
i want to remove from the loop statment and i have to select the datas ..
can any one sugesset some possible ways....
regards
veerahi,
Solution:
Never use select single in loop at itab!! for that :
Solution 1:
say ur main table is ITAB and rferring this u want to select data from other tables.
SELECT SINGLE Z_CTRY_ORIG INTO LS_PSHDESN-Z_CTRY_ORIG FROM ZLE_PART_MST
into table itab2
FOR ALL ENTRIES IN ITAB
WHERE WERKS = ITAB-LGNUM
AND MATNR = ITAB-MATNR.
With this what will hapeen , u will get all records in itab2 which u can update itab1(master) using loop.
solution 2:
Instead of all this use JOINs in select statement properly and u can fetch data in one shot this will reduce database load as well as abap load ( More than 3 joins in SELECT stmt are not recommeded but can be used)
I believe this is perfect solution if and only if u are giving joins on KEY fields only. Same is applied for wherer clause.
Hope this will help u, if not revert.
Jogdand M B -
Hi,
We have a scenario like this:
SO No.......Material...........Plant..........BILF Open Qty..........BILR open Qty
111111......ABC................BILR.............100.00....................100.00
222222......BCD................BILR.............200.00....................200.00
333333......CDE.................BILF.............300.00......................00.00
We want that where plant = BILR, then open qty should show in respective column. Now please look BILR open qty. 100 & 200 is showing in both columns. I want like this..
SO No.......Material...........Plant..........BILF Open Qty..........BILR open Qty
111111......ABC................BILR...............00.00....................100.00
222222......BCD................BILR...............00.00....................200.00
333333......CDE.................BILF.............300.00......................00.00
I think we are unable to clear the itab.
Please have a look on this code...
SELECT vbeln posnr matnr werks omeng FROM vbbe INTO CORRESPONDING FIELDS OF TABLE itab WHERE vbeln IN vbeln AND matnr IN matnr.
IF sy-subrc <> 0.
MESSAGE 'DATA NOT FOUND.' TYPE 'I'(001).
ENDIF.
SORT itab BY vbeln .
LOOP AT itab.
SELECT single maktx FROM makt INTO itab-maktx WHERE matnr = itab-matnr.
IF itab-werks = 'BILR'.
SELECT SINGLE omeng FROM vbbe INTO itab-omeng1 WHERE vbeln = itab-vbeln AND matnr = itab-matnr AND werks = 'BILR'.
ELSE.
ENDIF.
MODIFY itab .
ENDLOOP .
Regards,IF itab-werks = 'BILR'.
SELECT SINGLE omeng FROM vbbe INTO itab-omeng1 WHERE vbeln = itab-vbeln AND matnr = itab-matnr AND werks = 'BILR'.
Add one more column to itab.
clear itab-(field for BILF open item) .
MODIFY itab .
ENDIF. -
Debugger Problem: Full data is not displayed in the fields of the ITAB
Hi Guys,
I am having a problem related to ABAP Debugger. Data is not fully displayed in all the field of the internal table. I am using SAPGUI 640 with ECC6. In the debugger I have increased the width (size) of the column but still data is not fully displayed.
Below is the example:
*Actual Data* *Displayed As*
1141 11...
P42X13 P...
Testing Tes...
When I bring the curson on the displayed incomplete data, the full data is shown in small popup window.
I have increase the size of the column but still it is not showing the complete data.
I have to download the internal table data to an excel spreadsheet to view the complete data.
Please help.
Thanks,
miniI cannot use SAPGUI 710 as my company is not upgrading it to 710. We have to live with 640 for now.
SAPGUI details are as follows:
Name............: saplgpad.exe
Description.....: SAP Logon Pad for Windows
Product version.: 640 Final Release
File version....: 6405.5.21.1020
Build number....: 855417
Please help if you can. This is very frustrating.
Thanks. -
Problems displaying itab with 'REUSE_ALV_GRID_DISPLAY'
Hi experts!
I have a problem displaying the internal table itab_test. Itab_uload is a TYPE TABLE of a complex and nested structure I defined in the DDIC. I am able to pass the entries, which are not conform with the specifications, to itab_test, but when I execute the program I get a short dump.
Error message is:" It was tried to pass the internal table IT_FIELDCAT to the formal parameter IT_FIELDCAT. In doing so, a ^type conflict occured between the formal and the actual parameter."
Can anybody please advise on the code-sample below. What did I wrong and what can I do to correct it?
Thanks a lot for your help!
Johann
P.S.:Points will be rewarded for helpful answers!
*& DECLARATIONS
TYPES: BEGIN OF error_test,
oz TYPE c,
bez TYPE c,
END OF error_test.
DATA: itab_test TYPE TABLE OF error_test WITH HEADER LINE,
itab_upload TYPE TABLE OF zstr_gaeb WITH HEADER LINE.
DATA: wa_upload TYPE zstr_gaeb,
wa_lvbereich TYPE zstr_lvbereich,
wa_bereichdeslv TYPE zstr_bereichdeslv,
wa_beschreibung TYPE zstr_lvbeschreibung,
wa_position TYPE zstr_position.
DATA : it_fieldcat TYPE lvc_t_fcat,
wa_fieldcat LIKE LINE OF it_fieldcat,
wrk_pos TYPE i.
*& START OF SELECTION
START-OF-SELECTION.
LOOP AT itab_upload INTO wa_upload.
LOOP AT wa_upload-vergabe-lv-lvbereich INTO wa_lvbereich.
oz_len = STRLEN( wa_lvbereich-oz ).
IF oz_len <> 3.
MOVE wa_lvbereich-oz TO itab_test-oz.
MOVE wa_lvbereich-bez TO itab_test-bez.
ENDIF.
ENDLOOP.
ENDLOOP.
CLEAR wa_fieldcat.
wrk_pos = wrk_pos + 1.
wa_fieldcat-col_pos = wrk_pos.
wa_fieldcat-tabname = 'ITAB_TEST'.
wa_fieldcat-fieldname = 'oz'.
wa_fieldcat-seltext = 'Ordnungszahl'.
wa_fieldcat-emphasize = ''.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wrk_pos = wrk_pos + 1.
wa_fieldcat-col_pos = wrk_pos.
wa_fieldcat-tabname = 'ITAB_TEST'.
wa_fieldcat-fieldname = 'bez'.
wa_fieldcat-seltext = 'Bezeichnung'.
wa_fieldcat-emphasize = ''.
wa_fieldcat-hotspot = ''.
APPEND wa_fieldcat TO it_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = it_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab_test
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hello,
Make the change like this
DATA: L_R_REPID LIKE SY-REPID.
L_R_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = L_R_REPID " CHeck here
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
it_fieldcat = it_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab_test
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
VAsanth -
Problem displaying itab with reuse_alv_grid_display
Hi experts!
I passed non-conform entries from itab_upload to itab_test. I do not find any syntax error and I do not get a short dump, but the table which appears on the screen does not contain any data, but empty columns ( with the right title ). I also tried it with reuse_alv_list_display, but the in the fields of the list is written: no data.
I checked with the debugger and itab_test contains the data when it is passed to the Function...
Can you please advise me where I did wrong?
Below you will find the code.
Thanks a lot for your help!
Johann
P.S.:Points will be rewarded for helpful answers!
*& DECLARATIONS
TYPE-POOLS: slis.
TYPES: BEGIN OF error_test,
oz(255) TYPE c,
bez(255) TYPE c,
END OF error_test.
DATA: itab_test TYPE TABLE OF error_test WITH HEADER LINE,
itab_upload TYPE TABLE OF zstr_gaeb WITH HEADER LINE.
DATA: wa_upload TYPE zstr_gaeb,
wa_lvbereich TYPE zstr_lvbereich,
wa_bereichdeslv TYPE zstr_bereichdeslv,
wa_beschreibung TYPE zstr_lvbeschreibung,
wa_position TYPE zstr_position.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF it_fieldcat,
wrk_pos TYPE i.
*& START OF SELECTION
START-OF-SELECTION.
LOOP AT itab_upload INTO wa_upload.
LOOP AT wa_upload-vergabe-lv-lvbereich INTO wa_lvbereich.
oz_len = STRLEN( wa_lvbereich-oz ).
IF oz_len <> 3.
MOVE wa_lvbereich-oz TO itab_test-oz.
MOVE wa_lvbereich-bez TO itab_test-bez.
ENDIF.
ENDLOOP.
ENDLOOP.
CLEAR wa_fieldcat.
wrk_pos = wrk_pos + 1.
wa_fieldcat-col_pos = wrk_pos.
wa_fieldcat-tabname = 'ITAB_TEST'.
wa_fieldcat-fieldname = 'oz'.
wa_fieldcat-seltext = 'Ordnungszahl'.
wa_fieldcat-emphasize = ''.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wrk_pos = wrk_pos + 1.
wa_fieldcat-col_pos = wrk_pos.
wa_fieldcat-tabname = 'ITAB_TEST'.
wa_fieldcat-fieldname = 'bez'.
wa_fieldcat-seltext = 'Bezeichnung'.
wa_fieldcat-emphasize = ''.
wa_fieldcat-hotspot = ''.
APPEND wa_fieldcat TO it_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = l_r_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = it_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab_test
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hello,
The problem is here.
Firsdt
" First check her.
LOOP AT itab_upload INTO wa_upload.
LOOP AT wa_upload-vergabe-lv-lvbereich INTO wa_lvbereich.
oz_len = STRLEN( wa_lvbereich-oz ).
IF oz_len <> 3.
MOVE wa_lvbereich-oz TO itab_test-oz.
MOVE wa_lvbereich-bez TO itab_test-bez.
APPEND ITAB_TEST. " The table is not appended
ENDIF.
ENDLOOP.
ENDLOOP.
"Give the fieldname in UPPER CASE
CLEAR wa_fieldcat.
wrk_pos = wrk_pos + 1.
wa_fieldcat-col_pos = wrk_pos.
wa_fieldcat-tabname = 'ITAB_TEST'.
wa_fieldcat-fieldname = 'OZ'. " Check here
wa_fieldcat-seltext = 'Ordnungszahl'.
wa_fieldcat-emphasize = ''.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wrk_pos = wrk_pos + 1.
wa_fieldcat-col_pos = wrk_pos.
wa_fieldcat-tabname = 'ITAB_TEST'.
wa_fieldcat-fieldname = 'BEZ'. " Check here
wa_fieldcat-seltext = 'Bezeichnung'.
wa_fieldcat-emphasize = ''.
wa_fieldcat-hotspot = ''.
APPEND wa_fieldcat TO it_fieldcat.
If useful reward.
Vasanth
Maybe you are looking for
-
I upgraded to Mountain Lion and now I can't use any of my software!
What a disaster and huge mistake. Upgraded to Mountain Lion and now I can't run Autocad 2012 for Mac, any of my Adobe Creative suites software such as Photoshop, Illustrator.. and now I can't even do upgrades because Mountain Lion doesn't allow me t
-
Black and white printer recommendation?
I'm looking for an inexpensive workhorse printer to mainly print out text documents and such. Our old Apple Laserwriter won't network with Snow Leopard (believe me, I've tried everything) and the color cartridges for our color printer are so expensiv
-
I have to move gear around a bit and am thinking of using WiFi instead of the cable. It is difficult to keep all my cable. Is there any report/experience showing the 5B suffering as the 5A did.
-
Error with sdo_topo.add_topo_geometry_layer
Hi, when ich use execute sdo_topo.add_topo_geometry_layer, i recieve some errors. declare begin sdo_topo.add_topo_geometry_layer('stromnetz','ns_leitungsabschnitt_tab','position','point'); end; ERROR at line 1: ORA-13111: cannot add topo_geometry lay
-
As I'm learning, I also am experiencing some difficulties. I've tried to combine some XML data with an accordion. Since the <div> solutions gave me errors, I found some inspiration in the following thread. Can somebody help me and explain why this is