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.
Similar Messages
-
Reg : Find the records in Table control
Dear all
Im having one requirement in table control . In my table control totally 100 records contains sales documents
for Example
100010
100020
100030
In that Records how to find particluar sale document in table control. How to build find option in table control.
If possible or not
Thanks & regards
SriHi Sridhar,
You need to implement amodal screen for this and a Find button above the table control.
or you can use POPUP_GET_VALUES FM
after you enter a value in the POP up screen.
" You need to put some effort to implement this, wish you to implement it successfully as this is possible
READ TABLE ITAB WITH KEY VBELN = FIND_VBELN. " FIND_VBELN is the field on your find screen.
if sy-subrc = 0.
tc-top_line = sy-tabix. " this makes the record visible in the First position
endif.
PROCESS AFTER INPUT.
LOOP AT itab.
MODULE find.
ENDLOOP.
In Program
MODULE find INPUT.
DATA : tab TYPE STANDARD TABLE OF sval WITH HEADER LINE.
REFRESH tab.
CASE ok_code.
WHEN 'FIND'.
clear ok_code.
tab-tabname = 'VBAK'.
tab-fieldname = 'VBELN'.
APPEND tab.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
* NO_VALUE_CHECK = ' '
popup_title = 'Find Sales Order'
start_column = '5'
start_row = '5'
* IMPORTING
* RETURNCODE =
TABLES
fields = tab
EXCEPTIONS
error_in_fields = 1
OTHERS = 2
IF sy-subrc = 0.
READ TABLE itab WITH KEY vbeln = tab-value.
IF sy-subrc = 0.
tc-top_line = sy-tabix.
ENDIF.
ENDIF.
ENDCASE.
ENDMODULE. " find INPUT
Cheerz
Ram -
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 -
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 -
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 -
Sample coding for creating a function moudle to post the Idoc
hi,
I am working on Inbound idoc,
Aim : to update the Ztable
I have created the message type , idoc type and the segment type.
For creating an idoc i have used the Function module IDOC_INBOUND_WRITE_TO_DB.
Now for posting the idoc, i need to create the function module, the main aim is to insert record to the Ztable, what should be my input and the output parameters,
Can u provide the sample coding for itAs you are dealing with a IDOC, the parameters will have to be standard as any other IDOC processing function module. For example take a look at IDOC_INPUT_BANK_CREATE.
You will have to read the data exactly the way the standard code does and the only change will be once you read the data how do you want to handle the data.
Regards,
Ravi
Note : Please mark all the helpful answers -
How to find all the DDIC tables and fields of Tcode?
Hi All,
For several transactions we have caprtured all the filed names along with the technical names.
Ex : in VA03 - in the initial screen ,postal code field is there.When i see F1 help for that field i could see POST_CODE2 as its technical name.
But i want to see the actuall DDIC table field which corresponds to this field that is LFA1-PSTLZ.
Like wise there are so many T-codes for which i need do the same thing.But for some transactions i am unable to find out the database tables and the corresponding fields.Please suggest any other easier way to do this.
Is there any way to find out all the DDIC tables and fields that gets updated for a Tcode?
Please help me out in this.
Thanks,
Jyothi D.
Edited by: jyothi dosapati on Mar 27, 2008 2:48 PMHI,
DDIC tcode is SE11
GIVE THE TABLE NAME THERE AND CLICK DISPLAY
FOR EXAMPLE
TYPE LFA1 THERE AND CLICK DISPLAY....
Regards,
V .Balaji
Reward if usefull -
Adding quantity field for the same material number in Table control
Hello Experts,
I have an requirement, where I need to add the quantity field when the material number is repeated in a table control.
Here I show the pop-up message "Material already exists, do you want to add the quantity". If the user clicks on Yes I need to add the quantity.
I created the pop-up message using the FM " POPUP_TO_CONFIRM" and tried to add the quantity filed using COLLECT statement but I couldn't because my non-numeric field value will be different and it will insert new entry with same material in my internal table.
I have a z data base table & internal table with the below fields in it.
Best Regards,
Manihi deepthi,
chk a sample one which will help u. <b><i>f4 hlp in table control</i></b>
* 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.
* populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
*& Module help_responsibility INPUT
* text
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
rgds
Anver
<b><i>if hlped kindly mark points</i></b> -
How to use Page down functionality in BDC Table control
Hi Guys,
I am facing problem with populating data in the table control at item level. I am able to poulate upto 6 records, i need to populate n number of records.
Pls help me with using P+ functionality for table control in BDC.
Thanks in advance
SatishHi!
Can you share how you got this solved?
Thanks! -
How to find function location (TPLNR) from OBJEK field
Dear All,
PLEASE HELP ME IN FINDING THE FUNCTIONAL LOCATION (TPLNR) USING OBJEK FIELD (KEY OF OBJECT TO BE CLASSIFIED.
Regards,
Nikhil..Hi
Check These are againt OBJNR not OBJEK
IHSG
ILOA
MPLA
IFLOT
" Check this FM GET_TPLNR_WITH_ARBID
Cheerz
Ram -
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 -
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. -
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 helpDESCRIBE 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. -
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
Maybe you are looking for
-
Screen scrolls up and down / left to right
My wife has the old white glossy 13" macbook. About 4 years old, but with her service contract, has the latest software and all that jazz. Our one year old got to hitting a bunch of keys on her keyboard and disrupted some settings, that we can't figu
-
Problem with composite AV cable
I bought the apple composite AV cable to connect my iPad2 with the car but it doesn't work (my car is the 2009 Infiniti G37 sedan). Does anyone have experiences why it doesn't work?
-
Clean up AQ$_CT_capturename_P table
I have async distributed hotlog cdc setup on 9.2 databases. There are many changes capture daily on the source database and I notice that the AQ$_CT_capturename_P in the source cdc schema is growing extremely fast. It's at 8GB with 5 millions record
-
How can I eliminate the mesh screen which appears over any image I open in photoshop CS6?
How can I eliminate the mesh screen which appears over any image I open in photoshop CS6?
-
How do I download software such as Logic Pro 9 on my new MacBook Pro with Retina? It has no disc drive