Get table control field length
in table control i have a field with with char length 15 but i have to give a validation if lenght not equal to 6 giv error messgage with out changin the field length of table control
i used
DESCRIBE FIELD gi_pmpb_bchid-batchid LENGTH ln IN CHARACTER MODE.
IF ln <> 6.
MESSAGE e013(zc8isms).
ELSE.
but here length is coming as 15 only even if i enter 6 digits in field on TC
plz help
DESCRIBE returns the attributes of a data object. Length operators, like STRLEN, on the other hand, return a length of the data content.
if strlen( <mytable-fieldname> ) gt 6.
etc...
or lv_len = strlen( <mytable-fieldname> ).
if lv_len (of type i) gt 6.
etc...
put this in code, press F1 on STRLEN for informative help on finding lengths, whether field or table.
Similar Messages
-
Coding for giving 'find' functionality to a table control field
hi.
i want to give find functionality to a table control field.when ever i will select one field & i will enter 'find' icon one modal screen comes.when i will enter one value of that field it will highlight that field in the table control.Hi,
FIND <p> IN [SECTION OFFSET <off> LENGTH <len> OF] <text>
[IGNORING CASE|RESPECTING CASE]
[IN BYTE MODE|IN CHARACTER MODE]
[MATCH OFFSET <o>] [MATCH LENGTH <l>].
The system searches the field <text> for the pattern <p>. The SECTION OFFSET <off> LENGTH <len> OF addition tells the system to search only from the <off> position in the length <len>. IGNORING CASE or RESPECTING CASE (default) specifies whether the search is to be case-sensitive. In Unicode programs, you must specify whether the statement is a character or byte operation, using the IN BYTE MODE or IN CHARACTER MODE (default) additions. The MATCH OFFSET and MATCH LENGTH additions set the offset of the first occurrence and length of the search string in the fields <p> and <l>.
Regards,
Priya. -
Set cursor in table control field
I have developed module using table control have done validation for one field on Enter key press.In change mode if user changes value in table control field and presses Enter key then system is showing Error message on status bar and table control gets gray out.
if user again hits Enter key then this error message clears and Table control is in Edit mode.
Here I wan that Cursor should go to same filed from which error message occurred.
I have written Get Cursor In PAI event and Set Cursor in PBO after Loop at table control. I tried Set cursor within Lop at Table control in PBO.
But cursor is not coming on that field of table control.
I have written set cursor as below:
Set Cursor Field itab-fieldname Line lineno Offset offsetval.
Here itab is internal table assigned to table control.
Please let me know why cursor is not setting on particular field on table control.Hi Ganesh,
A simpler way would be to include the fields of the table in a chain-endchain block.
in PAI section.
PROCESS AFTER INPUT.
loop at IT_FINAL.
chain.
field WA_FINAL-JOBCARD.
field WA_FINAL-MATIDTAG.
field WA_FINAL-VORNR.
field WA_FINAL-ARBPL.
field WA_FINAL-ZZPULLCONTNRQTY.
field WA_FINAL-NOOFTAGS.
field WA_FINAL-ROUTE_TO.
module validate.
endchain.
endloop.
you can issue your error messages in the module validate.
REgards,
Ravi -
Disable / enable table control field at runtime
hi ,
i am working on a custom transaction in which i have a table control...depending on a table value i have to disable an input field inside the table control...
i know in a normal field we use
loop at screen.
if screen- name = 'XXX' or screen-group = 'XXX'
screen-output = 0.
endif.
but inside a table control field how to modify it.
Regards
Harish RamakrishnanAll you need to do is put some code in a module of your PBO. This will change the cell attribute of a single row.
PROCESS BEFORE OUTPUT.
* PBO FLOW LOGIC FOR TABLECONTROL 'I_INTRCON'
* MODULE I_INTRCON_CHANGE_TC_ATTR.
* MODULE I_INTRCON_CHANGE_COL_ATTR.
LOOP AT I_INTR
WITH CONTROL I_INTRCON
CURSOR I_INTRCON-CURRENT_LINE.
<b> MODULE I_INTRCON_CHANGE_FIELD_ATTR.</b>
ENDLOOP.
MODULE SET_CURSOR_FIELD.
MODULE STATUS_0200.
module i_intrcon_change_field_attr output.
modify i_intr index i_intrcon-current_line.
if i_intr-check = 'X'.
loop at screen.
if screen-name = 'I_INTR-RCVQTY'.
screen-input = '1'.
endif.
modify screen.
endloop.
endif.
endmodule.
Regards,
RIch Heilman -
How do i display input values (POV) for a table control field
Hi guyz !
How do i display input values (POV) for a field in table control,
i mean when user presses F4 on a table control field.
Please help.
Thanks
jahanPROCESS ON VALUE-REQUEST( F4 ) statement
Code to demonstrate how to perform a manual value help(F4) on a particular field using the PROCESS ON VALUE-REQUEST statement and how to return values back to a table control on the screen. For standard screen fields simply move the value to the appropriate screen field name.
* Screen flow logic........
PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.
PROCESS AFTER INPUT.
*MODULE PAI_MODULE.
PROCESS ON VALUE-REQUEST. "F4
FIELD EKPO-EBELP MODULE help_ekpo.
MODULE help_ekpo INPUT.
**Transport values to table dynpro/screen table control
DATA: l_stepl LIKE sy-stepl,
l_indx LIKE sy-stepl.
DATA: dynpfields LIKE dynpread OCCURS 5 WITH HEADER LINE.
* Adjust for scroling within table control
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
povstepl = l_stepl
EXCEPTIONS
stepl_not_found = 0
OTHERS = 0.
l_indx = tc_ekpotable-top_line + l_stepl - 1.
"tc_ekpotable should already have been declared
REFRESH dynpfields.
CLEAR dynpfields.
dynpfields-fieldname = 'EKPO-EBELN'.
dynpfields-fieldvalue = '00010' "wa_ekpo-ebeln.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
dynpfields-fieldname = 'EKPO-EBELP'.
dynpfields-fieldvalue = '00020' "wa_ekpo-ebelp.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLZZ_EKKO' "Program name
dynumb = '0100' "Screen number
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 0.
ENDMODULE. " help_ekpo INPUT
reward points if it is usefull ..
Girish -
Runtime error while putting negative value in to table control field
Hi Guys,
I am working on a Table Control which has Currency
and quantity fields.In PBO when the program is trying put a
negative value then It is going into a runtime error.
The Error description is,
Runtime errors DYNPRO_FIELD_CONVERSION
Error analysis
The program flow was interrupted and could not be resumed.
Program "SAPMZDBPRJCTEDFIG" tried to display fields on screen 0100. However, an
error occurred while this data was being converted.
How to correct the error
A conversion error occurred while the program was trying to display data on the screen.
The ABAP output field and the screen field may not have the same format.
Some field types require more characters on the screen than
in the ABAP program. For example, a date field on a screen needs
two characters more than it would in the program. When attempting to
display the date on the screen, an error will occur that triggers the
error message.
Screen name.............. "SAPMZDBPRJCTEDFIG"
Screen number............ 0100
Screen field............. "ZDB_PROJCTD_FIG-ZWORKDONE"
Error text............... "FX015: Sign lost." Further data:
I have tried increase the screen field length to more than the ABAP program field length and the scrren field name is of data type which supports signed value.
But still I am getting the error.the error is 'Sign is lost'.
I would appreaciate if you can help me with this.
Correct answer will be rewarded.
Thank you in advance,
Sanujit AcharyaCheck The Forum
Re: PA-BN : "FX015: Sign lost." dump
Kanagaraja L -
Provide Tooltip to a table control field
Hi there,
can anyone suggest me how do I provide tooltip to a field in a table control created thru screen painter? the field is of char4 type and it displays an ICON depending upon the business logic.
Regards,
Deb.Hai,
In screen painter
1. Go to element list.
2. Select the properties of that particular field.
3. There you can find 'TooltipText' property select text.
4. Here you can specify your text by two ways i.e, text element and value from variable.
If you follow the above steps you will get the tool tip text for a field.
Cheers,
Umasankar -
Adding F4 help in a table control field
Hi,
I Have a table control with records, i want to add an F4 functionality in one field. When you press f4 i want to bring a pop up screen for that field...please helpHi
Hope it will help you.
Reward if help.
Check the below link.
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
THis is example to upload the Bank details of the Vendor which has the TC.
REPORT zprataptable2
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF itab OCCURS 0,
i1 TYPE i,
lifnr LIKE rf02k-lifnr,
bukrs LIKE rf02k-bukrs,
ekorg LIKE rf02k-ekorg,
ktokk LIKE rf02k-ktokk,
anred LIKE lfa1-anred,
name1 LIKE lfa1-name1,
sortl LIKE lfa1-sortl,
land1 LIKE lfa1-land1,
akont LIKE lfb1-akont,
fdgrv LIKE lfb1-fdgrv,
waers LIKE lfm1-waers,
END OF itab.
DATA : BEGIN OF jtab OCCURS 0,
j1 TYPE i,
banks LIKE lfbk-banks,
bankl LIKE lfbk-bankl,
bankn LIKE lfbk-bankn,
END OF jtab.
DATA : cnt(4) TYPE n.
DATA : fdt(20) TYPE c.
DATA : c TYPE i.
INCLUDE bdcrecx1.
START-OF-SELECTION.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\first1.txt'
filetype = 'DAT'
TABLES
data_tab = itab.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\second.txt'
filetype = 'DAT'
TABLES
data_tab = jtab.
LOOP AT itab.
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-LIFNR'
itab-lifnr.
PERFORM bdc_field USING 'RF02K-BUKRS'
itab-bukrs.
PERFORM bdc_field USING 'RF02K-EKORG'
itab-ekorg.
PERFORM bdc_field USING 'RF02K-KTOKK'
itab-ktokk.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-LAND1'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFA1-ANRED'
itab-anred.
PERFORM bdc_field USING 'LFA1-NAME1'
itab-name1.
PERFORM bdc_field USING 'LFA1-SORTL'
itab-sortl.
PERFORM bdc_field USING 'LFA1-LAND1'
itab-land1.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
cnt = 0.
LOOP AT jtab WHERE j1 = itab-i1.
cnt = cnt + 1.
CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-banks.
CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankl.
CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankn.
IF cnt = 5.
cnt = 0.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
ENDIF.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-FDGRV'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFB1-AKONT'
itab-akont.
PERFORM bdc_field USING 'LFB1-FDGRV'
itab-fdgrv.
PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-ZTERM'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB5-MAHNA'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFM1-WAERS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFM1-WAERS'
itab-waers.
PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-LIFNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
PERFORM bdc_transaction USING 'XK01'.
ENDLOOP.
PERFORM close_group.
Header file:
1 63190 0001 0001 0001 mr bal188 b in 31000 a1 inr
2 63191 0001 0001 0001 mr bal189 b in 31000 a1 inr
TC file:
1 in sb 11000
1 in sb 12000
1 in sb 13000
1 in sb 14000
1 in sb 15000
1 in sb 16000
1 in sb 17000
1 in sb 18000
1 in sb 19000
1 in sb 20000
1 in sb 21000
1 in sb 22000
2 in sb 21000
2 in sb 22000
REPORT zmm_pr_upload_mat
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Standard Include for Selection Screen
INCLUDE bdcrecx1.
Internal Table for Upload Data
DATA: BEGIN OF i_pr OCCURS 0,
Header Screen
sno(3), " SNo
bsart(004), " PR Type
epstp(001), " Item Category
knttp(001), " Account Assignment
eeind(010), " Delivery Date
lpein(001), " Category of Del Date
werks(004), " Plant
lgort(004), " Storage Location
ekgrp(003), " Purchasing Group
matkl(009), " Material Group
bednr(010), " Tracking No
afnam(012), " Requisitioner
Item Details
matnr(018), " Material No
menge(017), " Quantity
badat(010),
frgdt(010),
preis(014), " Valuation Price
waers(005), " Currency
peinh(005),
wepos(001),
repos(001),
sakto(010), " GL Account
kostl(010), " Cost Center
bnfpo(005),
END OF i_pr.
Internal Table for header Data
DATA: BEGIN OF it_header OCCURS 0,
sno(3), " SNo
bsart(004), " PR Type
epstp(001), " Item Category
knttp(001), " Account Assignment
eeind(010), " Delivery Date
werks(004), " Plant
lgort(004), " Storage Location
ekgrp(003), " Purchasing Group
matkl(009), " Material Group
bednr(010), " Tracking No
afnam(012), " Requisitioner
END OF it_header.
Internal Table for Item Data
DATA: BEGIN OF it_item OCCURS 0,
sno(3), " SNo
matnr(018), " Material No
menge(017), " Quantity
preis(014), " Valuation Price
sakto(010), " GL Account
kostl(010), " Cost Center
END OF it_item.
Data Variables & Constants
CONSTANTS : c_x VALUE 'X'. " Flag
DATA : v_l(2), " Counter
v_rowno(5), " Row No
v_2(2), " Counter
v_rows LIKE sy-srows, " Rows in TC
v_field(45). " String
Parameters
PARAMETERS: p_file LIKE ibipparms-path. " Filename
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start of Selection
START-OF-SELECTION.
Open the BDC Session
PERFORM open_group.
Upload the File into internal Table
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = i_pr
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT i_pr BY sno.
LOOP AT i_pr.
MOVE-CORRESPONDING i_pr TO it_item.
APPEND it_item.
CLEAR it_item.
AT END OF sno.
READ TABLE i_pr INDEX sy-tabix.
MOVE-CORRESPONDING i_pr TO it_header.
APPEND it_header.
CLEAR it_header.
ENDAT.
ENDLOOP.
SORT it_header BY sno.
SORT it_item BY sno.
v_rows = sy-srows - 6.
Upload the Data from Internal Table
LOOP AT it_header.
Header Data
PERFORM bdc_dynpro USING 'SAPMM06B' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBAN-BEDNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'EBAN-BSART'
it_header-bsart.
PERFORM bdc_field USING 'RM06B-EPSTP'
it_header-epstp.
PERFORM bdc_field USING 'EBAN-KNTTP'
it_header-knttp.
PERFORM bdc_field USING 'RM06B-EEIND'
it_header-eeind.
PERFORM bdc_field USING 'RM06B-LPEIN'
it_header-lpein.
PERFORM bdc_field USING 'EBAN-WERKS'
it_header-werks.
PERFORM bdc_field USING 'EBAN-LGORT'
it_header-lgort.
PERFORM bdc_field USING 'EBAN-EKGRP'
it_header-ekgrp.
PERFORM bdc_field USING 'EBAN-MATKL'
it_header-matkl.
PERFORM bdc_field USING 'EBAN-BEDNR'
it_header-bednr.
PERFORM bdc_field USING 'EBAN-AFNAM'
it_header-afnam.
Item Details
v_l = 0.
To add no. of rows
v_2 = 0 .
As the screen is showing 13 rows defaulted to 130
v_rowno = 130 .
LOOP AT it_item WHERE sno = it_header-sno.
v_l = v_l + 1.
IF v_l = 14 .
IF v_2 = 12 .
v_2 = 12 .
v_l = 2 .
From second time onwards it is displaying 12 rows only
v_rowno = v_rowno + 120 .
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'RM06B-BNFPO'
v_rowno.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
ELSE.
V_2 initialized to 12 for second screen purpose
v_2 = 12 .
v_l = 2 .
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'RM06B-BNFPO'
v_rowno .
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
ENDIF.
ENDIF.
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
CLEAR v_field.
CONCATENATE 'EBAN-MATNR(' v_l ')' INTO v_field.
PERFORM bdc_field USING v_field it_item-matnr.
CLEAR v_field.
CONCATENATE 'EBAN-MENGE(' v_l ')' INTO v_field.
PERFORM bdc_field USING v_field it_item-menge.
PERFORM bdc_dynpro USING 'SAPMM06B' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBAN-PREIS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'EBAN-PREIS'
it_item-preis.
PERFORM bdc_dynpro USING 'SAPMM06B' '0505'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBKN-SAKTO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'EBKN-SAKTO'
it_item-sakto.
Cost Center
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'COBL-KOSTL'
it_item-kostl.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
Call The Transaction
PERFORM bdc_transaction USING 'ME51'.
ENDLOOP.
Close the BDC Session
PERFORM close_group. -
Search help on table control field which imports info from same record
Hi Team ABAP,
i got a slight problem here and kinda dont know how to proceed.
I got a DDIC structure containing fields KSCHL and NACHA.
Additionally i got a customizing table based on kschl, where allowed NACHA´s per KSCHL get customized.
Now i got a table control, containing records of type of above described structure.
I created a search help for Field NACHA which actually uses KSCHL as importing since we just want to see those NACHA´s allowed for the given KSCHL.
Search help itself works fine. I got problems in how to tell it which kschl to import.
I have coded an routine in event PROCESSES ON VALUE REQUEST.
There i could do DYNP_VALUES_READ or get my data right out of the itab on which the table control is based. i just got the problem that i dont have a clue how identify which search help of which table control line got clicked.
having a first look i dont see any of SY fields changing using different lines. So i´m stuck. any Ideas?
regards
Edited by: Florian Kemmer on Nov 30, 2010 9:01 AM
Edited by: Florian Kemmer on Nov 30, 2010 9:01 AMUse FM [DYNP_GET_STEPL|http://www.sdn.sap.com/irj/scn/advancedsearch?query=dynp_get_stepl] "Current sy-stepl at Event POV", then use the returned povstepl value in DYNP_VALUES_READ (and DYNP_VALUES_UPDATE if required)
Regards,
Raymond -
User defined F4 help on a table control field
hi
i m calling table maintenance view on click of a button on module pool screen . i have 1 column internal table which has the contents of help to be displayed on 1 of the fields in table control . how to code and where?
i m using CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
for user defined F4 help . but where exactly to code i dont knw.please help.
thank you.
Ajantha.Hi,
Inthe Module Pool Program, By Default the PROCESS BEFORE OUTPUT and PROCESS AFTER INPUT, at the same way we need to write the POV ...
As same as we need to write the POV enent manuvally, what you writen the Event will be work in the Report but that does not work in the Module pool Program you need to write PROCESS ON VALUE REQUEST
write as PROCESS ON VALUE REQUEST then under this write the Function module to call the F4 for that field
The Code should be like
PROCESS ON VALUE-REQUEST.
FIELD <f> MODULE <mod>. --> " Double click it and write the Function module for this then the F4 help will come for this Field
Look at the below link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm
Regards
Sudheer -
How to Make a Table control Field Editable but input disabled
Hi All,
I got a requirement that in table control one column should be in edit mode (i.e. input enabled) but user should not be able to type anything in that field or column rather he can select the value from F4 help (or pick list) associated with that field or column. How to do this ? Please dont say make sceeen-input = 0 for that field.
Experts please help me out...........
Thankx in Advance
Rizwan Ahmad SiddiquiHi,
I suggest you to go for a drop down instead of a search help.
Regards,
Charumathi.B -
Hi Experts,
I have create a module pool program where in there is a table control with some fields. I had a requirement where I need to disable all the tablecontrol fields when I click DISPLAY button. ( Display button ).
loop at screen.
if screen-group1 = 'GR'.
if sy-ucomm = 'CHANGE'.
screen-input = 1.
else.
screen-input = 0. " when clicked DISPLAY button.
endif.
endif.
endloop.
My problem is only menge ( Quantity) field is not disabling.
please provide your suggestions.
Thanks and Regards
Murali Krishna. THi Niraj,
I tried with modify screen as you suggested. But no solution.
Here one thing I need to make clear. Here Iam using TabStrip. The tabstrip control exits in screen 320. For this I declared a subscreen in the screen 340. Here in 340, the table control is there.
The push buttons DISPLAY and CHANGE are in screen 320. For these push buttons Iam writing the disable and enable functionality.
I think, If Iam able to identify the tablecontrol field in screen 320, the problem will be solved.
Screen Group ' GR ' is already used for another internal table for screen 320.
Do I need to use another Screen Group for my table control?
Also please make me clear about the difference between screen-group1
screen-group2
screen-group3
screen-group4
Thanks and regards,
Murali Krishna T -
Uploading excel file into internal table with field length more than 255
I am trying to upload the data from an excel file through function module 'TEXT_CONVERT_XLS_TO_SAP'.
I have tested by changing the field type from string, and char2000.
But it is accepting only 255 chars from the cell content.
How to get the total content of the field if it is more than 255 char.hi,
you can use any of the following procedures:
For uploading data from excel to internal table refer standard report RC1TCG3Z in se38 :
or
You can use the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' itself. Please check if you have done it this way . But, this FM can be a little time consuming if the excel has large data, so you can use the FM u2018GUI_UPLOADu2019.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file1
i_begin_col = l_b1
i_begin_row = l_c1
i_end_col = l_b2
i_end_row = l_c2
TABLES
intern = lt_data
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE e018 DISPLAY LIKE 'i'.
ENDIF.
*---Removing the first heading fields from the file.
IF NOT lt_data[] IS INITIAL.
LOOP AT lt_data INTO lwa_data WHERE row = '0001'.
DELETE lt_data.
CLEAR lwa_data.
ENDLOOP.
*---Inserting the data from file the internal table
LOOP AT lt_data INTO lwa_data.
CASE lwa_data-col.
WHEN 1.
wa_file_wicopa-serial = lwa_data-value.
WHEN 2.
wa_file_wicopa-blart = lwa_data-value.
WHEN 3.
wa_file_wicopa-bldat = lwa_data-value.
WHEN 4.
wa_file_wicopa-budat = lwa_data-value.
ENDCASE.
AT END OF row.
APPEND wa_file_wicopa TO gt_file_wicopa.
CLEAR wa_file_wicopa.
ENDAT.
CLEAR lwa_data.
ENDLOOP.
ENDIF.
ENDIF.
or
DATA: it_test TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE.
DATA :v_start_col TYPE i VALUE '1',
v_start_row TYPE i VALUE '1',
v_end_col TYPE i VALUE '256',
v_end_row TYPE i VALUE '65536',
v_text TYPE repti.
* Funtion Module to upload values from excel to the Internal table
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = v_start_col
i_begin_row = v_start_row
i_end_col = v_end_col
i_end_row = v_end_row
TABLES
intern = it_test
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.
Or
You can use FM u201CTEXT_CONVERT_XLS_TO_SAPu201D.
DATA : i_raw TYPE truxs_t_text_data.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_tab_raw_data = i_raw
i_filename = p_path
TABLES
i_tab_converted_data = itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2
hope it will help u
regards
rahul -
How to control field length in SAP query's report output
HI everybody,
I have one scenario in SAP query in which there are two fields in the report output:
Milestone descrition and milestone description Long Text.
In CJ02 (WBS element overview), these two fields are populated with some text.
If description is exactly same as LOng text, long text is NOT getting displayed in output.
If long text is having more characters than description then only long text gets displayed in the output.
Do we need to change infoset or query settings? I haven't handled SAP query programming before.
PLease give some suggestions how to achieve this or I have to write custom report.
Any inputs on this will be highly appreciated.
Regards
KaushalHi,
Refer to this link..Additional field in SAP Query
[Creating Additional Fields |http://help.sap.com/saphelp_nw04/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm]
[Code|http://help.sap.com/saphelp_nw04/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm] -
How to do the calculations with currency fields in table control?
Hi everybody,
Can anyone tell me how to do the calculations (arithmetical) with the currency fields which have been assigned for a table control fields? Actually they should be fetched from the database table and need to do some calculations and after that the same should get updated at the database level.
Here, i am getting the short dump after doing the calculations and trying to display at the table control field itself.....
Can anyone help me in this issue........
Thank you very much.....in advance,
Somu.Hi,
Thanks to your replies all,
But, even though the sign check box is checked in the SAP domain WRTV7, in my program it is not showing the negative sign at all...
I am keep trying for all the options...
But still it is not working out...
My requirement is after fetching the data from the database i need to do calculations and save back same to the customized table field, for which the domain i have checked the sign and have done it also...
I'd be highly thankful to you, if you can help me out...
Thank you,
Somu.
Maybe you are looking for
-
Want to change customer enhancement tab name in CJ20N
Hi Friends As per our requirement, we have created customer enhancement tab in CJ20N (project definition level). It shows the name as cust.enhancement, but as per our requirement we want to change the tab name. But we are not able to change that. if
-
Backing up mac backs up windows files thru parallels?
Do I need to backup my Windows files & programs separetly from my Mac backups. Currently using Time Machine, but out of space on my current EHD (500 GB). Planning to purchase a larger EHD (2-3 TB?). Any suggestions? Will Time Machine automatically b
-
I just installed Aperture 2.1.2 and am trying to add a text box over an image on a book page. On the actions bar the only buttons that work after selecting the image are the Set Photo Filter and Set Background. The buttons for Text Style, Metadata Fo
-
Imovie freezes like it's a cpu problem
IMovie 4 is freezing since I started using Tiger. old and new movies,short and long as though the cpu can't keep up. after about 32 seconds every movie. very seldom catches up. When I burn a dvd the movie plays fine on the computer. Any ideas what th
-
How can I can my acoount logged in all the time?
Hi Guys Just wondering if I could keep my account logged in all the time, like the "remember me" feature, because I get sick of typing my username and password all the time, especially when I am registered to like 15 forums!