BDC Ok-Code for Double Click
Hi ,
Could anyone let me know the BDC OK Code for Double click.
I need to select a row by double clicking it in my recording but not able to capture the code for it.
Please do the needful.
Thanks in Advance,
Sowmmya B
Hi sowmmya,
1. If the row you are talking about is
ALV Grid OO concepts,
then i think there is a problem.
It won't work with BDC as u are trying.
2. Well, for getting the code,
before double clicking go in debug mode /H
and then double click.
3. Now in deubbing mode,
see the value of sy-ucomm.
regards,
amit m.
Similar Messages
-
Code for double clicking rows in alvgrido/p and moving it to internal tabl
hi,
code for double clicking rows in alvgrido/p and moving it to internal tablehi,
see the following code which uses layout , double_click event in ALVGRID.
TABLES: mara,marc.
DATA:obj_custom TYPE REF TO cl_gui_custom_container,
obj_alv TYPE REF TO cl_gui_alv_grid.
DATA: it_mara TYPE TABLE OF mara,
wa_mara TYPE mara,
wa_layout TYPE lvc_s_layo,
wa_variant TYPE disvariant,
x_save.
DATA:it_marc TYPE TABLE OF marc,
wa_marc TYPE marc.
SELECT-OPTIONS: s_matnr FOR mara-matnr DEFAULT 1 TO 500.
START-OF-SELECTION.
SELECT * FROM mara INTO TABLE it_mara
WHERE matnr IN s_matnr.
CALL SCREEN '100'.
CLASS cl_dbclick DEFINITION
CLASS cl_dbclick DEFINITION.
PUBLIC SECTION.
METHODS dbl FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
ENDCLASS.
DATA: obj1 TYPE REF TO cl_dbclick.
CLASS cl_dbclick IMPLEMENTATION
CLASS cl_dbclick IMPLEMENTATION.
METHOD dbl.
IF e_row-rowtype = space AND NOT e_row-index IS INITIAL.
READ TABLE it_mara INDEX e_row-index INTO wa_mara.
SELECT * FROM marc INTO TABLE it_marc
WHERE matnr = wa_mara-matnr.
CALL METHOD obj_custom->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 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.
CALL SCREEN '200'.
ENDIF.
ENDMETHOD. "dbl
ENDCLASS. "cl_dbclick IMPLEMENTATION
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CALL METHOD obj_custom->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 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.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module filldata OUTPUT
text
MODULE filldata OUTPUT.
CREATE OBJECT obj_custom
EXPORTING
container_name = 'CONTROL'.
CREATE OBJECT obj_alv
EXPORTING
i_parent = obj_custom.
CREATE OBJECT obj1.
SET HANDLER obj1->dbl FOR obj_alv.
CALL METHOD obj_alv->set_table_for_first_display
EXPORTING
i_buffer_active =
i_bypassing_buffer =
i_consistency_check =
i_structure_name = 'MARA'
is_variant = wa_variant
i_save = x_save
i_default = 'X'
is_layout = wa_layout
is_print =
it_special_groups =
it_toolbar_excluding =
it_hyperlink =
it_alv_graphics =
it_except_qinfo =
ir_salv_adapter =
CHANGING
it_outtab = it_mara
it_fieldcatalog =
it_sort =
it_filter =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " filldata OUTPUT
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module STATUS_0200 OUTPUT
text
MODULE status_0200 OUTPUT.
SET PF-STATUS 'STATUS'.
* SET TITLEBAR 'xxx'.
SUPPRESS DIALOG.
SET PARAMETER ID 'MAT' FIELD wa_mara-matnr.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
*WRITE:/ wa_mara-matnr,
wa_mara-mbrsh,
wa_mara-meins.
CREATE OBJECT obj_custom
EXPORTING
container_name = 'CONTROL'.
CREATE OBJECT obj_alv
EXPORTING
i_parent = obj_custom.
CALL METHOD obj_alv->set_table_for_first_display
EXPORTING
i_buffer_active =
i_bypassing_buffer =
i_consistency_check =
i_structure_name = 'MARC'
is_variant = wa_variant
i_save = x_save
i_default = 'X'
is_layout = wa_layout
is_print =
it_special_groups =
it_toolbar_excluding =
it_hyperlink =
it_alv_graphics =
it_except_qinfo =
ir_salv_adapter =
CHANGING
it_outtab = it_marc
it_fieldcatalog =
it_sort =
it_filter =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module layout OUTPUT
text
MODULE layout OUTPUT.
wa_layout-grid_title = 'MATERIAL DATA'.
wa_layout-zebra = 'X'.
wa_layout-edit = 'X'.
ENDMODULE. " layout OUTPUT
*& Module variant OUTPUT
text
MODULE variant OUTPUT.
wa_variant-report = 'ZALV_GRID1'.
x_save = 'A'.
ENDMODULE. " variant OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE user_command_0200 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
CALL METHOD obj_custom->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 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.
LEAVE TO SCREEN '100'.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
thanks,
raji
reward if helpful -
How to call a screen /t-code by double clicking on the output of an alv?
Hi,
I want to call a screen / t-code on double clicking on the output of an alv report.
Suppose we click on a value in the "Pur Req" feild of the ALV output it should open the the transaction code and give us the details of that particular value. How can I do that?
Thanx in advance..If you displaying ALV using Classes..( CL_GUI_ALV_GRID)... You need to create event receiver and register the double click event handler method dynamically.... Here's the sample code...
* C L A S S E S *
class lcl_event_receiver definition.
public section.
methods: handle_double_click
for event double_click
of cl_gui_alv_grid
importing e_row e_column.
endclass.
* CLASS lcl_event_receiver IMPLEMENTATION
class lcl_event_receiver implementation.
method handle_double_click.
data: l_cc like line of gt_cc.
data:
g_row type i,
g_value(10),
g_col type i,
g_row_id type lvc_s_row,
g_col_id type lvc_s_col,
g_row_no type lvc_s_roid.
* Read the double click cell
call method gr_grid->get_current_cell
importing
e_row = g_row
e_value = g_value
e_col = g_col
es_row_id = g_row_id
es_col_id = g_col_id
es_row_no = g_row_no.
clear wa_itab
read table gt_itab index g_row_id into wa_itab.
case g_col_id.
when 'EBELN'. "Show Process Order
if not wa_itab-ebeln is initial.
set parameter id 'BES' field wa_cc-ebeln.
call transaction 'ME22N' and skip first screen.
endif.
call method gr_grid->set_table_for_first_display
exporting
i_consistency_check = g_consistency_check
it_toolbar_excluding = gt_exclude
is_variant = gs_variant
i_save = g_save
i_default = 'X'
is_layout = g_layout
changing it_outtab = gt_cc[]
it_fieldcatalog = gt_fieldcat[]
it_sort = gt_sortcat[].
create object event_receiver.
* Register the 'Double Click' event handler method dynamically.
set handler event_receiver->handle_double_click for gr_grid. -
Integrating code for mouse click!
Hello!
I'm trying to get this code working where I want to integrate a shortcut for clicking an button made in Egde Animate.
The code snippets you see is just some copied areas of the whole working code,
Serial.print(c);
if (c == '\n') {
if (readString.indexOf("?") <0)
//do nothing
else
if(readString.indexOf("UP=UP") >0)
movetiltupstep();
// now output HTML data starting with standard header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();
//set background to green
client.print("<body style=background-color:green>");
client.println("<hr />");
client.println("<center>");
client.println("<h1>Servo control</h1>");
client.println("<form method=get name=SERVO>");
client.println("<input type=submit value=UP name=UP style=\"width:100px\"><br>");
client.println("<input type=submit value=LT name=LT style=\"width:100px\"><input type=submit value=CN name=CN style=\"width:100px\"><input type=submit value=RT name=RT style=\"width:100px\"><br>");
client.println("<input type=submit value=DN name=DN style=\"width:100px\">");
client.println("</form>");
client.println("</center>");
client.println("</body></html>");
//clearing string for next read
readString="";
//stopping client
client.stop();
void movetiltupstep(){
tiltpos = tilt.read();
Serial.println(tiltpos);
if (tiltpos >= 66)
tilt.write(tiltpos - 2);
This is just an overview of my setup for a webpage, where I can move a servo with a button and this is called movetiltupstep();
The button is made here, ("<input type=submit value=UP name=UP style=\"width:100px\"><br>"); and I want to use this with the button in Edge Animate.
For a button this is the setup, function(sym, e) and I tried to integrate something like this:
// insert code for mouse click here
sym.$("<input type=submit value=UP name=UP>") but not working.
How would i proceed with this problem, ideas anyone?
Regards, Torimport javax.swing.*;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import java.awt.*;
public class MouseTracker extends JFrame implements MouseListener, MouseMotionListener
private JLabel statusBar;
public MouseTracker()
super("Demonstrating Mouse Events");
statusBar = new JLabel();
getContentPane().add(statusBar, BorderLayout.SOUTH);
addMouseListener(this);
addMouseMotionListener(this);
setSize(275, 100);
setVisible(true);
public static void main(String[] args)
MouseTracker application = new MouseTracker();
application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
public void mouseClicked(MouseEvent e)
statusBar.setText("Clicked at [" + e.getX() + ", " + e.getY() + "]");
public void mouseReleased(MouseEvent e)
statusBar.setText("Released at [" + e.getX() + ", " + e.getY() + "]");
public void mouseEntered(MouseEvent e)
statusBar.setText("Clicked at [" + e.getX() + ", " + e.getY() + "]");
getContentPane().setBackground(Color.GREEN);
public void mousePressed(MouseEvent e)
statusBar.setText("Pressed at [" + e.getX() + ", " + e.getY() + "]");
public void mouseExited(MouseEvent e)
statusBar.setText("Mouse outside window");
getContentPane().setBackground(Color.WHITE);
public void mouseDragged(MouseEvent e)
statusBar.setText("Dragged at [" + e.getX() + ", " + e.getY() + "]");
public void mouseMoved(MouseEvent e)
statusBar.setText("Moved at [" + e.getX() + ", " + e.getY() + "]");
} -
Double clicking is no longer opening my folders.
How can I adjust the double click speed in Mountain Lion to reduce the double clicking speed. The mouse system preferences does not seem to have a speed slider for double clicking. Only the tracking speed slider is visible.For 10.8.3, it's in System Preferences > Accessiblity > highlight Mouse & trackpad on the left. The Double click speed slider shows on the right. Moving it to the left gives you more time between clicks. Moving it right gives you less time.
-
Open T-code on double click of field in table maintenance
Hi Gurus,
I have one scenario, I have to show a transaction on double click event on a field of Table Maintence.
Please guide me in this .
Is there is any event in Table Maintenance Events to capture double_click of a field.
Regards,
Sowmen1. In the field attributes of the particular field there is a chechbox in display tab which says respond to double click, check that.
2. Assign the fuction code "PICK" for function code F2 in GUI status.
3.Now whenver you double click the field function code "PICK" gettes triggeed.
Now you can wrie yyou code based on this function code.
CASE sy-comm.
WHEN 'PICK'.
*If you want the name of the field and the value in that field use the below code.
GET CURSOR FIELD gv_field VALUE gv_cursor_value.
*DO your operation based on the field and the value.
ENDCASE.
Regards,
Smithesh -
OK CODE FOR SINGLE CLICK IN DYNPRO
HEY GUYS,
CAN YOU PLEASE TELL ME WHATS THE OKCODE FOR SINGLE CLICK.
IF I MAKE SINGLE CLICK IN TABLE CONTROL COLUMN HEADER ITS NOT GOING TO PAI FLOW LOGIC.
PLEASE SUGGEST ME ..HOW TO GO WITH PAI USING SINGLE CLICK ACTION WITH TABLE CONTROL COLUMN HEADER.
IS THERE ANY FUNCTION CODE I HAVE MAKE TO ON READY TO STATUS AT TABLE CONTROL COLUMNS.
THANKS IN ADVANCE.
AMBICHANHi Chan,
Instead of Single click better u can handle trying Double click... Then PAI will definitely be triggered..
Regards,
Sridhar -
Expand collapsed code by double-click. A ticking bomb
I might have posted about this before, but since the technical support doesn't accept cases after-hours (they seem not like to arrive to the office with tons of requests, so we are all squeezed to the the group of those that have the time to wait in line - in the chat… which often closes itself because of the long time waited)
When I double click collapsed code to expand it, Dreamweaver ALWAYS crashes. It might be on the spot, or later.
If I NEVER double click collapsed code, Dreamweaver can run for weeks without even closing it (I never shutdown my MacBook Pro)
If I do it, it WILL crash, usually on the spot, or minutes later.
When I dare to do it, and I forget that I did minutes later, I end up regretting when it finally crashes, and it NEVER dissapointed me: Soon it crashes as expected.
I already deleted all the possible preferences and customizations, and it still happens.
It's been happening for years, so it's not only DreamWeaver CC. Definitely from CS4 and up.
I use creative swite CC, on Mac OS 10.6.8I use creative swite CC, on Mac OS 10.6.8
Can you confirm the version(s) of DW you're running on 10.6.8?
Dreamweaver CC only runs on Mac OS X 10.7 and higher
http://www.adobe.com/products/dreamweaver/tech-specs.html -
Disabling normal JButton click behaviour for double click
This seems quite a poser.
Basically I have a test JButton for testing double click speed. This is in a dialog with the JButton and a JSlider.
I have some code which detects the double click, I add this as using 'addMouseListener()', but I need to disable the normal single click action of the JButton to replace it by the double click code calling 'doClick()'.
How do I disable the normal single click functionality ?
I have looked through the SDK source but cannot fathom the normal behaviour of the event mechanism.
Many thanks in advance.
AaronHere's an entire program. When I run it, it only catches doubleclicksimport javax.swing.*;
import java.awt.event.*;
public class Test {
public static void main(String[] args) {
TestFrame testFrame = new TestFrame("Test");
testFrame.pack();
testFrame.setSize(200,200);
testFrame.show();
class TestFrame extends JFrame {
public TestFrame(String Title) {
super(Title);
JPanel myContent = (JPanel)getContentPane();
JButton myButton = new JButton("Hello");
myContent.add(myButton);
myButton.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent me) {
if (me.getClickCount()==2) System.out.println("DoubleClick!!");
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); }
} -
Change preferences for double click on images in Bridge
Hiya,
I feel a bit silly for asking this because it seems so obvious, but the onvious way just doesn't seem to work for me.
When double-clicking on an image in Bridge, it opens Photoshop - which I suppose in some cases helps, but drives me crazy because it slows the system down so much. I want it to open Camera Raw 6 or just have a bigger preview of the photo.
I tried Edit/Preferences: Under General I ticked the option that double clicks edits camera raw settings
and under file associations I tried to associate jpg files with something other than photoshop but Camera Raw 6.0 is not offered to me there and I can't find the path that leads to it. What is the path? Or is there a different way?
Thanks so much!!
(Oh and another question, when when you filter for two keywords, you get all files that have either one or the other, how can I make them only show the ones that have both???)Don't think you could get a jpeg to open in camera raw with a double click as that is not the normal route, like it is with a raw image. If you right click on the image you have the option to open in camera raw.
If you do a search with 2 keywords it you only want images that have both you have to click if all criteria met in the match drop down box. -
Hi All,
I want to handle double click on ALV grid, I know there is a method of handling events, but I want to look into all the options.
So I want to know how can i catch the double click and wat will the sy-ucomm for it ?
thanks
AJWelcome to SCN!!
So I want to know how can i catch the double click and wat will the sy-ucomm for it ?
Just put the /h in command bar and double click on any line and see the value of sy-ucomm in debugger. -
How can I code for a click and drag to progress forward/backward in timeline
I'm working on a project, the goal is to have a .swf animation like this.
The functionality I'm looking for is:
1. I need my animation to make one full rotation and stop,
and then
2. I need to fix my AS3 so you have to CLICK/HOLD/DRAG to progress forward and backward through the timeline, but only when your holding the mouse button down.
Currently the code progresses the frame forward and backward in relation to the mouseX position.
Here is my current code:
import flash.events.MouseEvent;
var startPosition:Number=mouseX;
var delayTime=10;
gotoAndStop(1);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouse);
function onMouse(e:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE,onMouse);
var currentPosition:Number=mouseX;
if(mouseX-startPosition<=0){
nextFrame();
}else{
prevFrame();
setTimeout(setListener, delayTime);
function setListener(){
startPosition=mouseX;
stage.addEventListener(MouseEvent.MOUSE_MOVE,onMouse);
any help would be appreciated,
Thanks.Found a thread much like this one that solved all my problems
Here the link to anyone who might be pulling their hair out trying to figure this out in the future
http://forums.adobe.com/thread/570903?tstart=0
Thanks Adobe Forums -
BDC OK CODE FOR ENTER NOT RECORDING
I m creating a BDC Programme for uploading OLD PO date from excel to SAP System.
All PO's are Service PO.
PO's date and Delivery Date is in back date.
My programme working fine.
But i have to press enter manually due to PO Date = back date and Delivery date is also back date.
SHDB unable to record this event.
How to record this event.
Is there any way to disable system messages during BDC Programme.
When I press enter two times my programme runs very well.
Kindly help me.
Its very much urgent.
Code is give below.
REPORT zbdcme21n
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : l_file TYPE rlgrap-filename.
DATA: e_group_opened.
PARAMETERS session RADIOBUTTON GROUP ctu. "create session
*DATA : session RADIOBUTTON GROUP ctu.
DATA : group(12). "group name of session
group = 'BDC'.
*PARAMETERS: user(12) DEFAULT sy-uname. "user for session in batch
DATA : user(12).
user = sy-uname.
*DATA : keep AS CHECKBOX. "' ' = delete session if finished
DATA : keep TYPE checkbox.
keep = 'X'.
*PARAMETERS: holddate LIKE sy-datum. "'X' = keep session if finished
DATA : holddate LIKE sy-datum.
holddate = sy-datum.
PARAMETERS ctu RADIOBUTTON GROUP ctu. "call transaction
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF i_tab OCCURS 0, "excel data stored in this file.
row TYPE alsmex_tabline-row,
col TYPE alsmex_tabline-col,
value TYPE alsmex_tabline-value,
END OF i_tab.
DATA : BEGIN OF wa_line1 OCCURS 0, "excel data stored in this file.
row TYPE alsmex_tabline-row,
col TYPE alsmex_tabline-col,
value TYPE alsmex_tabline-value,
srno TYPE i,
END OF wa_line1.
DATA : wa_line2 LIKE wa_line1 OCCURS 0 WITH HEADER LINE .
DATA : wa_hdr1 LIKE wa_line1 OCCURS 0 WITH HEADER LINE .
DATA : wa_hdr LIKE i_tab OCCURS 0 WITH HEADER LINE .
DATA : wa_line LIKE i_tab OCCURS 0 WITH HEADER LINE .
DATA : w_cnt TYPE i . "store total no of pos
DATA : w_hdr_counter VALUE 1. "for header line count
DATA : w_line_counter VALUE 1. "for Line Item Counter.
w_cnt = 0.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
PARAMETER: dataset TYPE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR dataset.
PERFORM upload_file.
*include bdcrecx1.
START-OF-SELECTION.
PERFORM process_itab.
*include bdcrecx1.
START-OF-SELECTION.
PERFORM open_group.
**********************start for header
w_hdr_counter = 1.
WHILE w_hdr_counter <= w_cnt.
PERFORM bdc_dynpro USING 'SAPMM06E' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-BEDAT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
READ TABLE wa_hdr1 WITH KEY col = 2 srno = w_hdr_counter.
PERFORM bdc_field USING 'EKKO-LIFNR'
wa_hdr1-value. "'800000'.
READ TABLE wa_hdr1 WITH KEY col = 3 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-BSART'
wa_hdr1-value. "'ZS'.
READ TABLE wa_hdr1 WITH KEY col = 4 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-BEDAT'
wa_hdr1-value. " '14.01.2008'.
PERFORM bdc_field USING 'RM06E-LPEIN'
'T'.
READ TABLE wa_hdr1 WITH KEY col = 13 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-EEIND'
wa_hdr1-value. "'14.01.2008'. "Delivery Date
PERFORM bdc_field USING 'RM06E-LPEIN'
'T'.
READ TABLE wa_hdr1 WITH KEY col = 6 srno = w_hdr_counter.
PERFORM bdc_field USING 'EKKO-EKORG'
wa_hdr1-value. "'serv'.
READ TABLE wa_hdr1 WITH KEY col = 7 srno = w_hdr_counter.
PERFORM bdc_field USING 'EKKO-EKGRP'
wa_hdr1-value. "'dce'. Purchase Group
READ TABLE wa_hdr1 WITH KEY col = 8 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-EPSTP'
wa_hdr1-value. "'d'. Item Category
READ TABLE wa_hdr1 WITH KEY col = 9 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-KNTTP'
wa_hdr1-value. "'p'. Account Asign Category
READ TABLE wa_hdr1 WITH KEY col = 10 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-WERKS'
wa_hdr1-value. "'1001'.Plant
READ TABLE wa_hdr1 WITH KEY col = 11 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-LGORT'
wa_hdr1-value. " '1101'. Store Location
READ TABLE wa_hdr1 WITH KEY col = 12 srno = w_hdr_counter.
PERFORM bdc_field USING 'RM06E-MATKL'
wa_hdr1-value. "'c003'. Material Group
PERFORM bdc_dynpro USING 'SAPLMLSP' '0200'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
********************end of Header Data*******************
data i type n value 1.
data bfield type string.
LOOP AT wa_line1 WHERE col = 1 AND srno = wa_hdr1-srno.
READ TABLE wa_line2 WITH KEY COL = 14 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING 'RM11P-HEADTEXT'
wa_line2-value. " 'Earthwork text'.
concatenate 'ESLL-SRVPOS(' i ')' into bfield.
PERFORM bdc_field USING 'BDC_CURSOR'
bfield. " 'ESLL-SRVPOS(01)'. "increase counter
PERFORM bdc_field USING 'RM11P-NEW_ROW'
'10'.
READ TABLE wa_line2 WITH KEY COL = 15 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING bfield "'ESLL-SRVPOS(01)'
wa_line2-value. "'5000000000'.
concatenate 'ESLL-MENGE(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 16 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING bfield "'ESLL-MENGE(01)' "qty
wa_line2-value. "'15'.
concatenate 'ESLL-MEINS(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 17 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING bfield "'ESLL-MEINS(01)'
wa_line2-value. "'ft3'.
concatenate 'ESLL-TBTWR(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 18 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING bfield " 'ESLL-TBTWR(01)'
wa_line2-value. "'150'.
PERFORM bdc_field USING 'BDC_OKCODE' "Manually added
'/00'.
PERFORM bdc_dynpro USING 'SAPLMLSK' '0200'.
concatenate 'ESKN-PS_PSP_PNR' i ')' into bfield.
PERFORM bdc_field USING 'BDC_CURSOR'
'ESKN-PS_PSP_PNR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'VRTKZ1'
'X'.
concatenate 'ESKN-SAKTO(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 19 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING 'ESKN-SAKTO(01)' "GL Account No.
wa_line2-value. " '6010010'.
concatenate 'ESKN-PS_PSP_PNR(' i ')' into bfield.
READ TABLE wa_line2 WITH KEY COL = 20 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
PERFORM bdc_field USING 'ESKN-PS_PSP_PNR(01)'
wa_line2-value. " 'HR/KMP-KU'. "WBS Element
PERFORM bdc_dynpro USING 'SAPLMLSK' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'ESLL-INTROW'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'VRTKZ1'
'X'.
PERFORM bdc_dynpro USING 'SAPLMLSP' '0200'.
i = i + 1.
ENDLOOP.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'VRTKZ1'
'X'.
PERFORM bdc_dynpro USING 'SAPLMLSP' '0200'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RM11P-HEADTEXT'
'Earthwork text'.
*perform bdc_field using 'BDC_CURSOR' "Start Service Line 2
'ESLL-SRVPOS(02)'.
*perform bdc_field using 'RM11P-NEW_ROW'
'10'.
*perform bdc_field using 'ESLL-SRVPOS(02)'
'5000000006'.
*perform bdc_field using 'ESLL-MENGE(02)'
'10'.
*perform bdc_field using 'ESLL-MEINS(02)'
'kmk'.
*perform bdc_field using 'ESLL-TBTWR(02)'
'500'.
*perform bdc_dynpro using 'SAPLMLSK' '0200'.
*perform bdc_field using 'BDC_CURSOR'
'ESLL-INTROW'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'VRTKZ1'
'X'.
*perform bdc_dynpro using 'SAPLMLSK' '0200'.
*perform bdc_field using 'BDC_CURSOR'
'ESKN-PS_PSP_PNR(01)'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'VRTKZ1'
'X'.
*perform bdc_field using 'ESKN-SAKTO(01)'
'6010010'.
*perform bdc_field using 'ESKN-PS_PSP_PNR(01)'
'HR/KMP-KU'.
*perform bdc_dynpro using 'SAPLMLSK' '0200'.
*perform bdc_field using 'BDC_CURSOR'
'ESLL-INTROW'.
*perform bdc_field using 'BDC_OKCODE'
'=BACK'.
*perform bdc_field using 'VRTKZ1'
'X'.
*perform bdc_dynpro using 'SAPLMLSP' '0200'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RM11P-HEADTEXT'
'Earthwork text'.
*perform bdc_field using 'BDC_CURSOR'
'ESLL-KTEXT1(01)'.
*perform bdc_field using 'RM11P-NEW_ROW'
'10'.
*perform bdc_dynpro using 'SAPLMLSP' '0200'.
*perform bdc_field using 'BDC_OKCODE'
'=ESB'.
*perform bdc_field using 'RM11P-HEADTEXT'
'Earthwork text'.
*perform bdc_field using 'BDC_CURSOR'
'ESLL-KTEXT1(01)'.
*perform bdc_field using 'RM11P-NEW_ROW'
'10'.
*perform bdc_dynpro using 'SAPMM06E' '0120'.
*perform bdc_field using 'BDC_CURSOR'
'RM06E-EBELP'.
*perform bdc_field using 'BDC_OKCODE'
'=MALL'.
*perform bdc_field using 'RM06E-EBELP'
'10'.
PERFORM bdc_dynpro USING 'SAPMM06E' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-EBELP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=KOPF'.
PERFORM bdc_field USING 'RM06E-EBELP'
'10'.
PERFORM bdc_dynpro USING 'SAPMM06E' '0101'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EKKO-EKGRP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TXK'.
*perform bdc_field using 'EKKO-EKGRP'
'DCE'.
*perform bdc_field using 'EKKO-PINCR'
'10'.
*perform bdc_field using 'EKKO-UPINC'
'1'.
*perform bdc_field using 'EKKO-WAERS'
'INR'.
*perform bdc_field using 'EKKO-WKURS'
' 1.00000'.
PERFORM bdc_dynpro USING 'SAPMM06E' '0103'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-LTEX1(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'RM06E-LTEX1(01)'
'Old PO no.'.
*perform bdc_transaction using 'ME21'.
w_hdr_counter = w_hdr_counter + 1.
ENDWHILE.
CALL TRANSACTION 'ME21' USING bdcdata MODE 'A'.
PERFORM close_group.
***************forms************
FORM upload_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
*def_filename = ' '
*def_path = ' '
*mask = ' '
mode = '0'
title = 'Choose the Appropriate excel sheet for service PO upload'
IMPORTING
filename = dataset
*EXCEPTIONS
*inv_winsys = 01
*no_batch = 02
*selection_cancel = 03
*selection_error = 04
l_file = dataset.
PERFORM read_exceldata.
ENDFORM. "UPLOAD_FILE
*& Form READ_EXCELDATA
text
FORM read_exceldata.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = l_file
i_begin_col = 1
i_begin_row = 2
i_end_col = 25
i_end_row = 4
TABLES
intern = i_tab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
ENDFORM. "READ_EXCELDATA
create batchinput session *
(not for call transaction using...) *
FORM open_group.
IF session = 'X'.
SKIP.
WRITE: /(20) 'Create group'(i01), group.
SKIP.
open batchinput group
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = group
user = user
keep = keep
holddate = holddate.
WRITE: /(30) 'BDC_OPEN_GROUP'(i02),
(12) 'returncode:'(i05),
sy-subrc.
ENDIF.
ENDFORM. "OPEN_GROUP
end batchinput session *
(call transaction using...: error session) *
FORM close_group.
IF session = 'X'.
close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /(30) 'BDC_CLOSE_GROUP'(i04),
(12) 'returncode:'(i05),
sy-subrc.
ELSE.
IF e_group_opened = 'X'.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /.
WRITE: /(30) 'Fehlermappe wurde erzeugt'(i06).
e_group_opened = ' '.
ENDIF.
ENDIF.
ENDFORM. "CLOSE_GROUP
*& 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
****bdc field************
FORM bdc_field USING fnam fval.
IF FVAL <> NODATA.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
FORM process_itab.
APPEND LINES OF i_tab TO wa_hdr .
DELETE wa_hdr WHERE col > 13 .
APPEND LINES OF i_tab TO wa_line .
DELETE wa_line WHERE col <> 1 AND col < 14 .
DATA : w_sr TYPE i.
w_sr = 0.
LOOP AT wa_hdr.
IF wa_hdr-col = 1.
w_sr = wa_hdr-value.
ENDIF.
wa_hdr1-row = wa_hdr-row.
wa_hdr1-col = wa_hdr-col.
wa_hdr1-value = wa_hdr-value.
wa_hdr1-srno = w_sr.
APPEND wa_hdr1.
w_cnt = wa_hdr-row.
ENDLOOP.
w_sr = 0.
LOOP AT wa_line.
IF wa_line-col = 1.
w_sr = wa_line-value.
ENDIF.
wa_line1-row = wa_line-row.
wa_line1-col = wa_line-col.
wa_line1-value = wa_line-value.
wa_line1-srno = w_sr.
APPEND wa_line1.
ENDLOOP.
w_sr = 0.
CLEAR wa_line2.
LOOP AT wa_line1.
wa_line2-row = wa_line1-row.
wa_line2-col = wa_line1-col.
wa_line2-value = wa_line1-value.
wa_line2-srno = wa_line1-srno.
APPEND wa_line2.
ENDLOOP.
ENDFORM. "PROCESS_ITAB
***************forms************Hi Pradeep
I find there is a problem in your code
When ever you use
PERFORM bdc_field USING 'BDC_OKCODE'
you should follow it up with
PERFORM bdc_dynpro USING <prg name> <screen number>
Please find code below with changes from a part of your code
PERFORM bdc_field USING 'RM06E-MATKL'
wa_hdr1-value. "'c003'. Material Group
* comment this statement is not needed now.
* PERFORM bdc_dynpro USING 'SAPLMLSP' '0200'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
READ TABLE wa_line2 WITH KEY COL = 14 SRNO = wa_hdr1-srno ROW = wa_line1-ROW.
* Put the bdc_dynpro for the prg name and screen number (I might be wrong with prg name and
* Screen number
PERFORM bdc_dynpro USING 'SAPLMLSK' '0200'.
Reward points as this will definitely help you
Edited by: Sriram Chandran on Mar 15, 2008 4:39 PM -
Hi.
I did go through the JAVA tutorial here, but I still am not very clear about how to do double buffering. Can someone just give me a sample code? It would make my understanding clearer.
Also, for making games like mario or contra, should I use .gif images or .jpg?
Thanking You allprivate Image offScreenImage;
private Graphics offScreen;
public void update(Graphics g){
offScreenImage=createImage(this.getSize().width, this.getSize().height);
offScreen=offScreenImage.getGraphics();
paint(offScreen);
g.drawImage(offScreenImage,0,0,this);
there you go... enjoy =)
Michael -
Executing javascript code for button click
in my application i have report page where i am displaying table data when i click a button it selects first row and returns it using htp.prn() now i m getting that record in jvascript now i want to execute this java script code when the button is clicked i tried using onClick attribute but it didn't work can anyone tell me how to do it?
Hi,
I think this is related to Application express, right ?
You could post your question in Application Express forum
Oracle Application Express (APEX)
Also please give more detail about your issue. Post e.g. code (pl/sql & javascript) you try to use.
Also if you setup sample about your problem to http://apex.oracle.com will help others to help you.
Help us to help you =)
Br, Jari
Maybe you are looking for
-
I'm running bootcamp Windows 8 on a MacBook Pro and a MacMini (on home network). I have them set up for remote access. At home on the same network, I can remote desktop to the MacMini using the local IP address with no problems. I then wanted to acc
-
Getting class not found error running java application using OIM libraries
Hi, I have created a java application in which I access OIM libraries to fetch user list and then assign user roles. As i run the application it generates exception and program crashes. However, I am using the same libraries in OIM adapters and it is
-
How to parse a raw string that returns an XML file?
Guys, Good day! I was assign to work on this but I did'nt know what to start. Please help me. The Problem is something like this: xml-file = pword(raw data string, token interpretation string) returns an XML file of: token type, token (value), positi
-
Hi, Here is my scenario - NWCE 7.1, EJB as a WebService and I want to access the SOAP Header, what would be the best way. I'm thinking of using handler-chains, appreciate any suggestions. Rajiv.
-
Making a track in Logic, and i realise that the velocity for all midi i've recorded is way down at 3.. I dont why its set so low is this just Logic doing this as default? Anyway i've gone and manually changed the all the notes velocity to match at 10