Handling w/selcolumn in table control
Hi experts,
I have a table control made manually, I set w/selcolumn field to NUM. How can I handle that if i select a row and then push the 'PUSHBUTTON' then it made a selection and goes to the next screen.
So I only want to know how can we know which row the user selected, how can we get data from that row?
Hi,
When the Push button is pressed, then follw this logic,
For the table control you have the Internal table, then you have the Field callesd NUM, then if the Push button is pressed, then
READ TABLE ITAB with key NUM = 'X'. " Selected line will be read
IF sy-subrc = 0
" Move to other Structure with only the header data
endif.
Regards
Sudheer
Similar Messages
-
REGARDING "w/selcolumn" IN table control
hi experts,
i m not able to use "w/selcolumn" in table control.
cud u plz how will i use this to delete the data from database table as per the data showing in the table control.
plz help meHi,
<u>Step 1</u>
In your PAI capture all the seleted rows into an internal table. The following code snippet does that.
recsel -> value you have given for w/selcolumn
gt_student_select -> Internal table having the selected rows for deletion
gt_student
module select_record input.
if recsel = 'X'.
read table gt_student_select with key student_id = gt_student-student_id
if sy-subrc eq 4.
gt_student_select-mandt = gt_student-mandt.
gt_student_select-student_id = gt_student-student_id.
gt_student_select-student_name = gt_student-student_name.
gt_student_select-student_address = gt_student-student_address.
gt_student_select-student_average = gt_student-student_average.
append gt_student_select.
endif.
else.
delete table gt_student_select from gt_student.
endif.
endmodule.
<u>Step 2</u>
Perform deletion using the internal table gt_student_select.
when 'DELETE'.
clear ok_code.
"deletes matching record from database table
DELETE ztrch_stud_kri1 FROM table gt_student_select.
"deletes the record from the itab
loop at gt_student_select.
delete table gt_student from gt_student_select.
endloop.
"sets the number of lines displayed in the table control to the
"number of line in the internal table.
DESCRIBE TABLE gt_student LINES tabctrl-lines.
clear gt_student_select[].
***********************Reward points if found useful***************
Regards,
Kriththika. -
To handle cursor position in table control while using insert initial line
hi,
I have a requirement to handle cursor position in my table control in which i am using insert initial line by incrementing the index. Now i am handling the cursor position by using set cursor but after 14 records it is going to the first field of the screen. My table control length is 14 records.
How to handle this, please reply me if anyone know.
thanks & regards,
sekhar.hi,
I need to page down the page and then want to set cursor position but for this system command i am getting space for every command. Page down and cursor down or enter every thing it is taking as space. So for this how can i handle it.
thanks & regards,
sekhar. -
How to handle scroll bar in table control in bdc
hi friends,
how to handle scroll bar coding in table control in bdc
Thanks & Regards,
Srinadh Dhi,
check the sites :
table control scrolling:
Scrolling in table control
Re: scrolling in table control
Table control - Vertical scrolling problem
table control scrolling problem -
Error Handling in table control for line item.
Hi,
Please how to do error handling in table control for line item in bdc,i have used format_message for header but i don't no fill decamps internal tabled and how to do background processing in call transaction.
ThanksBackground processing is not possible using call transaction method.
You can create an executable program which can have CALL TRANSACTION BDC code. And this can be run in background.
What do you exactly mean by Error handling for Items in table control. Can you give some more details. -
Using Drop down box in a table control
Hi,
I'm new to ABAP. I'm trying to use drop down boxes as fields inside a table control.Im using 2 fields (f1 and f2). I want to dynamically populate values in f2 based on f1 i.e once i choose a value in f1 and click on f2 , it should give me a list of values in f2 based on the value of f1. f1 and f2 are from different tables.
what i have done : i am able to populate values in f2 (based on the value of f1)
Problem::
1. Once i choose a value in the field f1, the value is not remaining in the field. Once i choose, the value blinks for a while and goes off ! ... ( my guess :: PBO is clearing it )
2. After i choose a value in f1 in the first row, the corresponding values in f2 are getting populated in all the rows.Hi!
For your first problem: Try to handle normal field (without table control) first.
In PAI, you have to move value from dynpro field to your program field. In case of tables, you have to modify corresponding line of internal table.
Then next PBO will read updated value and screen display doesn't loose any longer changes.
In case of identical naming of screen fields / global fields in program, some movements are done automatically by system based on this naming. That's of course not possible with internal tables, so try a global field with a name different to field on screen to see the behavior.
For your second problem: I guess, your struggling with a global work area of your internal table, which is not correctly filled with screen values for each time -> once filled, all lines changed.
Regards,
Christian -
hi all,
i need to sort the contents of a table control dynamically,how can i do this..
for ex: if user clicks on 'unpack' for a Handling Unit(HU) on table control 1(TC1) , i display the contents of it in TC2.
and when he clicks on some other HU in TC1 and again clicks 'unpack' i need to sort the previous and present contents so that i can see them in a sorted order in TC2.
i tried sorting the table on which iam looping but thats leaving balnks in TC2 until my logic finds the contents of the HU to be displayed.(for ex. if HU has posnr 90 and 100, the TC2 has the first 8 rows blank, if i use sort)..
please suggest
thanksPlease make sure that you REFRESH your control before displaying the screen again.
REFRESH CONTROL 'TC2_CONTROL' from screen '100'.
Regards,
Rich Heilman -
Passing Table Control to a routine
Hi all
I am writing a routine common to many dynpros. In this routine I have to handle data about a table control, but I don't know how to pass it to a routine .. or better, I don't know how to declare the form:
FORM my_form table_control TYPE ????
ENDFORM.
If is impossible, it should be sufficient to have the COLS table of the table control, but also here cannot understand which type can be used for passing this table as arguments to a form.
does anyone faced this issue ?
thanks for help
regards
GabrieleThough you have a table control, you will be looping at some itab for that table control. Why dont you pass that itab to the subroutine.
FORM test TABLES p_gt_test.
ENDFORM.
p_gt_test will become the structure that you are actually passing. Hope this helps. -
How to handle table control in PO change
Hi All,
R/3 is sending PO details and Vendor is using third party front end to access the PO.He has changed the PO and these changes need to be reflected in the PO. Data is coming from external sytem to R/3 through IDOC. I need to handle the changes in the PO at the ITEM level. It has the table control. I don't know about table control. Kindly help me inorder to update the PO for a particular tab in PO item(ME22N).
I have checked the process code : ORDH and FM: MPN30_IDOC_INPUT_ORDCAD
Regards
Kannaiah
Rewards for helpful answersHi Ravikanth,
Thanks for the reply.
I checked the PO item for the fields which need to be updated. I am unable to find some fields in the FM which i had mentioned. Shall I need to use any Userexit or include for this. If yes, can you tell me the user exit for this. I have checked the following exits: AMPL0001
LMEDR001
LMELA002
LMELA010
LMEQR001
LMEXF001
LWSUS001
M06B0001
M06B0002
M06B0003
M06B0004
M06B0005
M06E0004
M06E0005
ME590001
MEETA001
MEFLD004
MELAB001
MEQUERY1
MEVME001
MM06E001
MM06E003
MM06E004
MM06E005
MM06E007
MM06E008
MM06E009
MM06E010
MMAL0001
MMAL0002
MMAL0003
MMDA0001
MMFAB001
MRFLB001 -
How to handle the table control in bapi?
how to handle the table control in bapi? example va01.
i pass multiple line item what is the procedure?
header detail same .
eample ship to party
sale to party.
line item mulptiple
10 mat1
2o mat2
30 mat3.
in bapi we can pass sinle line item.
any way to handle multiple line item pass through the bapi.
Message was edited by:
Karthikeyan PanduranganBAPI is not going through the screen flow logic so you need not to worry about the table control. Just check in the BAPi there must be one table parameter for line items just pass one int table with your data to that table parameter it will automatically update the tables.
Regards
shiba dutta -
In BDC'S how to handle Table control
Hi,
I want to know the concept and code for BDC's in Table control steps(MM01,VA01) and coding.Please its very Urgent.Hi Raghavendra,
Go through this program mm01.
rePORT ymmbdcmm01
NO STANDARD PAGE HEADING LINE-SIZE 255.
*& Table Declarations *
TABLES:rmmg1,makt,mara,mvke, marc,mbew,t100.
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
*& Data Declarations *
DATA:
BEGIN OF t_data OCCURS 0,
data TYPE string,
END OF t_data.
DATA:BEGIN OF it_mess OCCURS 0,
msgtyp(5),
lms(200),
msgv1(50),
END OF it_mess.
DATA: BEGIN OF it_itab OCCURS 0,
matnr TYPE rmmg1-matnr,
mbrsh TYPE rmmg1-mbrsh,
mtart TYPE rmmg1-mtart,
werks TYPE rmmg1-werks,
lgort TYPE rmmg1-lgort,
vkorg TYPE rmmg1-vkorg,
vtweg TYPE rmmg1-vtweg,
maktx TYPE makt-maktx,
meins TYPE mara-meins,
matkl TYPE mara-matkl,
spart TYPE mara-spart,
GEWEI TYPE MARA-GEWEI,
dwerk TYPE mvke-dwerk,
versg TYPE mvke-versg,
mtpos TYPE mvke-mtpos,
mtvfp TYPE marc-mtvfp,
tragr TYPE mara-tragr,
ladgr TYPE marc-ladgr,
sernp TYPE marc-sernp,
txline(25), "added
kordb ,
mprof TYPE mara-mprof,
ekgrp TYPE marc-ekgrp,
dismm TYPE marc-dismm,
dispo TYPE marc-dispo,
disls TYPE marc-disls,
mabst(13) TYPE c,
beskz TYPE marc-beskz,
sobsl TYPE marc-sobsl,
lgpro TYPE marc-lgpro,
dzeit TYPE c,
plifz(3) TYPE c,
webaz TYPE c,
fhori TYPE marc-fhori,
eisbe TYPE c,
strgr(2) TYPE c,
vrmod TYPE c,
vint1(3),
vint2(3),
wzeit(3),
sbdkz TYPE marc-sbdkz,
bklas TYPE mbew-bklas,
vprsv TYPE mbew-vprsv,
verpr(11),
peinh TYPE c,
ekalr TYPE mbew-ekalr,
losgr TYPE c,
RGEKZ(1),
fevor(3),
END OF it_itab.
*decl of internal table of table control for BDCDATA & BDCMSGCOLL
DATA : BEGIN OF bdcdata OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdcdata.
DATA:it_msgtab TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE,
it_msgtab1 TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
DATA : fld(50) TYPE c,
cnt(2) TYPE n,
l_mstring(150).
START-OF-SELECTION.
*& File uploading from xlsheet to sap *
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = 'C:\Documents and Settings\sapthamm\Desktop\mm02.xls'
TABLES
i_tab_converted_data = it_itab
EXCEPTIONS
conversion_failed = 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.
*& Splitting the Internal Table *
LOOP AT t_data.
SPLIT t_data-data AT cl_abap_char_utilities=>horizontal_tab INTO
it_itab-matnr
it_itab-mbrsh
it_itab-mtart
it_itab-werks
it_itab-lgort
it_itab-vkorg
it_itab-vtweg
it_itab-maktx
it_itab-meins
it_itab-matkl
it_itab-spart
it_itab-GEWEI
it_itab-dwerk
it_itab-versg
it_itab-mtpos
it_itab-mtvfp
it_itab-tragr
it_itab-ladgr
it_itab-sernp
it_itab-mprof
it_itab-ekgrp
it_itab-dismm
it_itab-dispo
it_itab-disls
it_itab-mabst
it_itab-beskz
it_itab-sobsl
it_itab-lgpro
it_itab-dzeit
it_itab-plifz
it_itab-webaz
it_itab-fhori
it_itab-eisbe
it_itab-strgr
it_itab-vrmod
it_itab-vint1
it_itab-vint2
it_itab-wzeit
it_itab-sbdkz
it_itab-bklas
it_itab-vprsv
it_itab-peinh
it_itab-ekalr
it_itab-losgr
APPEND it_itab.
CLEAR: it_itab,
t_data-data.
ENDLOOP.
*perform open_dataset using dataset.
*perform open_group.
*do.
*read dataset dataset into it_itab.
*if sy-subrc <> 0. exit. endif.
*& it_itabing of Material Type-HALB *
LOOP AT it_itab.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RMMG1-MATNR'
it_itab-matnr.
PERFORM bdc_field USING 'RMMG1-MBRSH'
it_itab-mbrsh.
PERFORM bdc_field USING 'RMMG1-MTART'
it_itab-mtart.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(17)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(02)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(04)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(05)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(06)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(08)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(09)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(12)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(13)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(14)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(15)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(17)'
'X'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(09)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(02)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(06)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(07)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(08)'
'X'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(09)'
'X'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-VTWEG'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'RMMG1-WERKS'
it_itab-werks.
PERFORM bdc_field USING 'RMMG1-LGORT'
it_itab-lgort.
PERFORM bdc_field USING 'RMMG1-VKORG'
it_itab-vkorg.
PERFORM bdc_field USING 'RMMG1-VTWEG'
it_itab-vtweg.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-SPART'.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MARA-MATKL'
it_itab-matkl.
PERFORM bdc_field USING 'MARA-SPART'
it_itab-spart.
PERFORM bdc_field USING 'MARA-GEWEI'
'kg'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MARA-SPART'
it_itab-spart.
PERFORM bdc_field USING 'MVKE-DWERK'
it_itab-dwerk.
PERFORM bdc_field USING 'MARA-MATKL'
it_itab-matkl.
PERFORM bdc_field USING 'MVKE-SKTOF'
'X'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MG03STEUER-TAXKM(02)'.
PERFORM bdc_field USING 'MG03STEUER-TAXKM(01)'
'0'.
PERFORM bdc_field USING 'MG03STEUER-TAXKM(02)'
'1'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4200'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'MAKT-MAKTX'
it_itab-MAKTX_040.
*perform bdc_field using 'BDC_CURSOR'
'MG03STEUER-TAXKM(05)'.
PERFORM bdc_field USING 'MG03STEUER-TAXKM(03)'
'1'.
PERFORM bdc_field USING 'MG03STEUER-TAXKM(04)'
'1'.
PERFORM bdc_field USING 'MG03STEUER-TAXKM(05)'
'0'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MARA-SPART'
it_itab-spart.
PERFORM bdc_field USING 'MVKE-DWERK'
it_itab-dwerk.
PERFORM bdc_field USING 'MARA-MATKL'
it_itab-matkl.
PERFORM bdc_field USING 'MVKE-SKTOF'
'X'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'BDC_CURSOR'
'MVKE-MTPOS'.
PERFORM bdc_field USING 'MVKE-VERSG'
it_itab-versg.
PERFORM bdc_field USING 'MVKE-MTPOS'
it_itab-mtpos.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MARA-GEWEI'
'KG'.
PERFORM bdc_field USING 'MARC-MTVFP'
it_itab-mtvfp.
PERFORM bdc_field USING 'MARA-TRAGR'
it_itab-tragr.
PERFORM bdc_field USING 'MARC-LADGR'
it_itab-ladgr.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-SERNP'.
PERFORM bdc_field USING 'MARC-SERNP'
it_itab-sernp.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4040'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=LTEX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_dynpro USING 'SAPLSTXX' '1100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RSTXT-TXLINE(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TXVB'.
PERFORM bdc_field USING 'RSTXT-TXLINE(02)'
'pcb assembly'.
PERFORM bdc_dynpro USING 'SAPLSTXX' '1100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RSTXT-TXLINE(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TXBA'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4040'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SP09'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MARC-EKGRP'
it_itab-ekgrp.
PERFORM bdc_field USING 'MARA-MATKL'
it_itab-matkl.
PERFORM bdc_field USING 'MARC-KORDB'
'X'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-MPROF'.
PERFORM bdc_field USING 'MARA-MPROF'
it_itab-mprof.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MARC-EKGRP'
it_itab-ekgrp.
PERFORM bdc_field USING 'MARC-DISMM'
it_itab-dismm.
PERFORM bdc_field USING 'MARC-DISPO'
it_itab-dispo.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-MABST'.
PERFORM bdc_field USING 'MARC-DISLS'
it_itab-disls.
PERFORM bdc_field USING 'MARC-MABST'
it_itab-mabst.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARC-BESKZ'
it_itab-beskz.
PERFORM bdc_field USING 'MARC-SOBSL'
it_itab-sobsl.
PERFORM bdc_field USING 'MARC-LGPRO'
it_itab-lgpro.
if it_itab-sernp = 'TJSL'.
PERFORM bdc_field USING 'MARC-RGEKZ'
ELSE.
PERFORM bdc_field USING 'MARC-RGEKZ'
'1'.
ENDIF.
PERFORM bdc_field USING 'MARC-DZEIT'
it_itab-dzeit.
PERFORM bdc_field USING 'MARC-PLIFZ'
it_itab-plifz.
PERFORM bdc_field USING 'MARC-WEBAZ'
it_itab-webaz.
PERFORM bdc_field USING 'MARC-FHORI'
it_itab-fhori.
PERFORM bdc_field USING 'MARC-EISBE'
it_itab-eisbe.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARC-PERKZ'
'M'.
PERFORM bdc_field USING 'MARC-STRGR'
it_itab-strgr.
PERFORM bdc_field USING 'MARC-VRMOD'
it_itab-vrmod.
PERFORM bdc_field USING 'MARC-VINT1'
it_itab-vint1.
PERFORM bdc_field USING 'MARC-VINT2'
it_itab-vint2.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-WZEIT'.
PERFORM bdc_field USING 'MARC-MTVFP'
it_itab-mtvfp.
PERFORM bdc_field USING 'MARC-WZEIT'
it_itab-wzeit.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-SBDKZ'.
PERFORM bdc_field USING 'MARC-SBDKZ'
it_itab-sbdkz.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MARC-FEVOR'
'001'.
PERFORM bdc_field USING 'MARC-LGPRO'
it_itab-lgpro.
PERFORM bdc_field USING 'MARC-SERNP'
it_itab-sernp.
PERFORM bdc_field USING 'MARC-DZEIT'
it_itab-dzeit.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
*perform bdc_field using 'MARA-IPRKZ'
it_itab-IPRKZ.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-GEWEI'
'KG'.
PERFORM bdc_field USING 'MARC-SERNP'
it_itab-sernp.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MARA-SPART'
it_itab-spart.
PERFORM bdc_field USING 'BDC_CURSOR'
'MBEW-VPRSV'.
PERFORM bdc_field USING 'MBEW-BKLAS'
it_itab-bklas.
*perform bdc_field using 'MBEW-EKLAS'
it_itab-EKLAS.
PERFORM bdc_field USING 'MBEW-VPRSV'
'v'.
PERFORM bdc_field USING 'MBEW-PEINH'
'1'.
perform bdc_field using 'MBEW-VERPR'
it_itab-VERPR.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'MARA-MEINS'
it_itab-meins.
PERFORM bdc_field USING 'MBEW-EKALR'
'X'.
PERFORM bdc_field USING 'MARC-AWSLS'
'000001'.
PERFORM bdc_field USING 'MARC-LOSGR'
'1'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
it_itab-maktx.
PERFORM bdc_field USING 'BDC_CURSOR'
'MBEW-ZPLPR'.
*perform bdc_field using 'MBEW-ZPLPR'
'6000'.
PERFORM bdc_field USING 'MBEW-BKLAS'
it_itab-bklas.
PERFORM bdc_field USING 'MBEW-VPRSV'
'V'.
PERFORM bdc_field USING 'MBEW-PEINH'
'1'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
CALL TRANSACTION 'MM01' USING bdcdata MODE 'A'
UPDATE 'S'
MESSAGES INTO it_msgtab.
CLEAR bdcdata[].
CLEAR it_itab.
PERFORM error.
ENDLOOP.
*& Declaration of Error Handling *
i
it_msgtab1-msgv1 = it_msgtab-msgv1.
it_msgtab1-msgv2 = it_msgtab-msgv2.
it_msgtab1-msgv3 = it_msgtab-msgv3.
APPEND it_msgtab1.
ENDLOOP.
download error message to a file by using function module
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'C:\Documents and Settings\sapthamm\Desktop\error.xls'
filetype = 'ASC'
APPEND = ' '
write_field_separator = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_EOL = ABAP_TRUE
IMPORTING
FILELENGTH =
TABLES
data_tab = it_mess
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form BDC_DYNPRO
text
-->PROGRAM text
-->DYNPRO text
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF FVAL <> .
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
form error.
LOOP AT it_msgtab.
IF it_msgtab-msgtyp = 'E'.
SELECT SINGLE * FROM t100 WHERE sprsl = it_msgtab-msgspra
AND arbgb = it_msgtab-msgid
AND msgnr = it_msgtab-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH it_msgtab-msgv1 INTO l_mstring.
REPLACE '&2' WITH it_msgtab-msgv2 INTO l_mstring.
REPLACE '&3' WITH it_msgtab-msgv3 INTO l_mstring.
REPLACE '&4' WITH it_msgtab-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH it_msgtab-msgv1 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv2 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv3 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
it_mess-msgtyp = it_msgtab-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = it_msgtab-msgv1.
APPEND it_mess.
WRITE: / it_msgtab-msgtyp, l_mstring(150).
ELSE.
WRITE: / it_msgtab.
it_mess-msgtyp = it_msgtab-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = it_msgtab-msgv1.
APPEND it_mess.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM.
LOOP AT it_msgtab.
Rewords some points.
rgds,
P.Naganjana reddy -
How to handle table control in BDC while uploading item details for anorder
How to handle table control in BDC while uploading item details for an order?
What is the use of CTU_PARAMS structure in BDC?
In Finance I have done some changes to the layout set by coping to a zscript(duning letter) and how can assign the print program?
What is the process to test the finance script?
How can I see the print preview whether it is coming correctly or not?
Thanks in advance.
Regards.
Abhilash.hi,
for the bdc control refer the following link:
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
ctu_params:
refer to the link
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/dataTransfers-LSMW%2CALE%2C+BDC
reward if useful,
thanks and regards -
How can we handle table control parameter in lsmw
hi guru,
please tell me how can we handle table control parameter in lsmw.
thanks & regards
subhasis.Hi,
we create table control program (module pool) this program use in LSMW,
we mention the transaction code ,write ur table control program name.
This is use full for u
Reguards,
lakshmi -
How can we handle table control in BDC?
Hi,
How can we handle table control in BDC?
regards
eswarhi,
check this example:
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
ex:
*& Report ZSR_BDC_TBCTRL
REPORT ZSR_BDC_TBCTRL
NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES : RF02K,LFA1,LFBK.
DATA : BEGIN OF IT_VEN OCCURS 0,
LIFNR LIKE RF02K-LIFNR,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
SPRAS LIKE LFA1-SPRAS,
BANKS(6) TYPE C,
BANKL(17) TYPE C,
BANKN(19) TYPE C,
END OF IT_VEN.
DATA : BEGIN OF BANKS OCCURS 0,
BANKS LIKE LFBK-BANKS,
END OF BANKS,
BEGIN OF BANKL OCCURS 0,
BANKL LIKE LFBK-BANKL,
END OF BANKL,
BEGIN OF BANKN OCCURS 0,
BANKN LIKE LFBK-BANKN,
END OF BANKN.
DATA : FLD(20) TYPE C,
CNT(2) TYPE N.
DATA : BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
INCLUDE BDCRECX1.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'Z:\sr.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = IT_VEN
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
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
PERFORM OPEN_GROUP.
LOOP AT IT_VEN.
REFRESH BDCDATA.
REFRESH : BANKS,BANKL,BANKN..
SPLIT IT_VEN-BANKS AT ',' INTO TABLE BANKS.
SPLIT IT_VEN-BANKL AT ',' INTO TABLE BANKL.
SPLIT IT_VEN-BANKN AT ',' INTO TABLE BANKN.
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'
IT_VEN-LIFNR.
PERFORM BDC_FIELD USING 'RF02K-KTOKK'
IT_VEN-KTOKK.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'LFA1-NAME1'
IT_VEN-NAME1.
PERFORM BDC_FIELD USING 'LFA1-SORTL'
IT_VEN-SORTL.
PERFORM BDC_FIELD USING 'LFA1-LAND1'
IT_VEN-LAND1.
PERFORM BDC_FIELD USING 'LFA1-SPRAS'
IT_VEN-SPRAS.
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(02)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
*perform bdc_field using 'LFBK-BANKS(01)'
'DE'.
*perform bdc_field using 'LFBK-BANKS(02)'
'DE'.
*perform bdc_field using 'LFBK-BANKL(01)'
'10020030'.
*perform bdc_field using 'LFBK-BANKL(02)'
'67270003'.
*perform bdc_field using 'LFBK-BANKN(01)'
'12345'.
*perform bdc_field using 'LFBK-BANKN(02)'
'66666'.
MOVE 1 TO CNT.
LOOP AT BANKS.
CONCATENATE 'LFBK-BANKS(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKS-BANKS.
CNT = CNT + 1.
ENDLOOP.
MOVE 1 TO CNT.
LOOP AT BANKL.
CONCATENATE 'LFBK-BANKL(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKL-BANKL.
CNT = CNT + 1.
ENDLOOP.
MOVE 1 TO CNT.
LOOP AT BANKN.
CONCATENATE 'LFBK-BANKN(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKN-BANKN.
CNT = CNT + 1.
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 'SAPLSPO1' '0300'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=YES'.
PERFORM BDC_TRANSACTION USING 'XK01'.
ENDLOOP.
PERFORM CLOSE_GROUP. -
How to handle Table control in BDC
How to handle Table control in BDC
HI,
Table Control in BDC
HI,
Refer the link:
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
The concept is easy: it has to indicate the index of the table control in the field name, so if you have to populate the first record of table control:
BDC-FIELDNAME = <FIELDNAME>(01).
If you fill the second row:
BDC-FIELDNAME = <FIELDNAME>(02).
and so....
Now the problem is usually on how many records you have to load, because u can fill only the rows of table control available in the screen, If you have more records than it can be displayed yuo have to simulate the command to go next page.
The number of recod can be displayed can depend on pc resolution and many program haven't command to go to next page (in this case it could be impossible create a BDC program9.
A way to create a bdc program resolution indipendent is to work on the first and second row.
- Place the first hit in the first row of bdc;
- Place the second insert in the second row of bdc;
- Place the last hit to the top of table control;
- Place the next hit in the second row;
- Place the last hit to the top of table control;
- Place the next hit in the second row;
- .... and so
For more info: Search in SDN with TABLE CONTROL IN BDC.
Will get a lot of related links.
<b>Reward points if this Helps.
Manish</b>
Maybe you are looking for
-
How do you deal with this Exception in Java xml transformation
I was trying to use a java class to do a multiple transformation on and xml file that consists of several xml codes as files. This is the Error i got Exception in thread "main" java.lang.OutOfMemoryError
-
Csv rtf and xls files in file sender
Hi Experts, I had a requirement to design an interface, its basically just a file to file with certain mappings as per business requirements. The input file is currently expected in .csv or .xml or .xls. My query (can be even be considered juvenile:-
-
How to track variables with the CaptivateQuizAnalyzer
I recently purchased Adobe Captivate 6 and I have been using Acrobat.com as an LMS. I had two questions: 1) Can you track the number of slide views and slide viewing time for quiz slides and have Acrobat.com report it the Captivate Quiz Analyzer? and
-
Publishing service, missing published collection
I have the basics of a publishing service going, uploading images to an online gallery. Works fine apart from after I publish the 2 images in the 'New Photos to Publish' collection they're not being moved into a 'Published Photos' collection. One doe
-
Tax Exemption for a Contract Account
Dear Experts, A tax is raised during invoicing of electricity bill for all Contract Accounts. I have a requirement where I have to exempt tax for some Contract Accounts. The tax code has been defined in IMG in Financial Accounting. When inputting the