How to include "position"-control in a table control
Dear all,
I have a situation where I need to add a new option in the table control screen I have been developing .
I need to be able to select one field entry and bring it on top of the display in the table.
How can I acomplish this!?
please help!!
Vj
Hi..
try like this....
u have tabstrip...to select...one row..right...
now place a pushbutton on the screen when click on this..
with the function code...write CASE: and then..
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
IF <MARK_FIELD> = 'X'.
W_INDEX = SYST-TABIX.
and read <itab> with key <MARK_FIELD> = 'X'.
now copy that into another work area and then delete it from the itab..
now insert it in top in the itab..and then continue....
check the following code...
*& Module USER_COMMAND_0999 INPUT
text
MODULE USER_COMMAND_0999 INPUT.
DATA:
H_TAB_WA LIKE G_TAB_WA.
CASE W_UCOMM.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'TAB_MODI' OR 'SAVE'.
LOOP AT G_TAB_ITAB INTO G_TAB_WA.
FORMAT INPUT OFF.
MOVE-CORRESPONDING G_TAB_WA TO YH642_RAM.
READ TABLE H_TAB_ITAB WITH KEY EID = G_TAB_WA-EID INTO H_TAB_WA.
IF SY-SUBRC EQ 0.
IF G_TAB_WA NE H_TAB_WA.
MODIFY YH642_RAM.
ENDIF.
ELSE.
INSERT YH642_RAM.
ENDIF.
ENDLOOP.
SORT G_TAB_ITAB.
ENDCASE.
Similar Messages
-
How do you position side by side tables so they print correctly on separate sheets?
How do you position side by side tables so they print correctly on separate sheets?
Hi CJ,
I just saw this solution by Jerry:
https://discussions.apple.com/thread/5653936?tstart=0
It is non-intuitive how to get there, but Menu > File > Print... to get to Print Preview. Then Click on Print.. at bottom right. This does not print, but opens a dialogue where you can choose to Open PDF in Preview (click on PDF bottom left).
Have fun!
Regards,
Ian. -
I have the following problem:
1. I'd like to include additional Information in my table of contents which I don't want to appear in the text I refer to.
Example: I do have a picture with a caption saying:
picture 1: Blablabla.
And I want to have the source of the picture as additional information in the table of contents:
picture 1........Blablabla (source: thisandthat)........23
Still I don't want this additional content to disappear, as soon as I update the table of contents!
How can I achieve that?
2. And how can I have this the other way round?
Let's say I want the source in the caption, but not in the table of contents.
So the caption says:
picture1: Blablabla (source: thisandthat)
but the table of content says:
picture 1........Blablabla.....................23
I was trying to achieve this by two different praograph styles in the caption. One which would be listed, and one which wouldn't be listed, but this of course resulted in always having two paragraphs in the caption, which I'd like to avoid:
picture1: Blablabla
(source: thisandthat)
Any solution to this?
Best Regards,
Rainer SchwachsinnSorry, missed the second part of the question. I think the only way to do that is to use invisible "dummy" text of some sort, and if you're going to do it for some entries, you might as will do it for all.
One of the easiest ways is to put the text you want inthe TOC into an anchored frame attached to the actual heading in the text (so it moves along with it). Use a unique paragraph style for this text, and include this style, not the one applied to the headings inthe text, to make the TOC. I usually use a character color of red to make it satnd oout so I don't forget it's there, and the position on the page isn't really critical. Select the anchored frame, open the Attributes panel and make it non-printing. You'll see it in editing mode, the TOC will pick it up (as will variables, if required) but it will disappear on output. -
How to include tool bar in alv table?
Dear All,
I want to know how to use tool bar in alv table? Is there any seperate interfaces available for it?
Thanks,
Gopi.Hi,
1.To deactivate the Standard buttons:
Data: lr_config_table TYPE REF TO cl_salv_wd_config_table,
lo_value = lo_interfacecontroller->get_model( ).
lr_config_table ?= lo_value .
Wd_this->lr_config_table ?= lo_value .
lr_config_table->if_salv_wd_std_functions~set_edit_append_row_allowed( abap_false ).
lr_config_table->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
lr_config_table->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_false ).
2.To create the customized buttons:
Create the a method initilaze_buttons.
Data:lv_function_add_record_sap TYPE REF TO cl_salv_wd_function,
lv_button_add_record_sap TYPE REF TO cl_salv_wd_fe_button,
R_ALV_TABLE_COMP type ref to CL_SALV_WD_CONFIG_TABLE.
r_alv_table_comp = wd_this->lr_config_table.
Generate Function Objects
lv_function_add_record_sap = wd_this->lr_config_table->if_salv_wd_function_settings~create_function( 'ADD_RECORD_SAP' ).
Generate Buttons
CREATE OBJECT lv_button_add_record_sap.
lv_button_add_record_sap->set_image_source( 'ICON_INSERT_ROW' ).
lv_button_add_record_sap->set_text( 'Add Record' ).
Assign Buttons to Functions
lv_function_add_record_sap->set_editor( lv_button_add_record_sap ).
Set positions of the buttons
lv_function_add_record_sap->set_position( value = 1 ).
Set Alignment of the buttons
lv_function_add_record_sap->set_alignment( value = if_salv_wd_c_function_settings=>align_left ).
Call this method initilaze_buttons in WDDOINIT .
3.To find out which button is clicked an dhandling that function
A)Go to methods tab.
B)give the name of the method as on_button select the method type as Eventhandler.
In the event coulmn select the event ON_FUNCTION of the ALV comp.
METHOD on_button .
DATA index TYPE i.
index = wd_this->sort_index .
CASE r_param->id."r_param->id is importing paramter which comes automatically once u use the event handler
WHEN 'DELETE_ROW'. "Delete row
wd_this->delete_row( )."methods you need to create and call them here.(your own customized button functionality
WHEN 'ADD_RECORD_SAP'.
wd_this->add_record_sap( ).
ENDCASE.
r_param->id holds the value which button is clicked.
Priya -
How to use position hierarchy for approval in custom workflow ?
Dear All,
I have created a custom workflow which fires when ever a new supplier site is created.
Now I want to add approval hierarchy in this flow. For that I want to use Position Hierarchy.
I have not find useful resources for doing that. Can you please help me?
Regards,
RubayatHi;
Please review:
How to Create a New Position Hierarchy [ID 437489.1]
Adding Positions to a Hierarchy from Another Business Group [ID 356127.1]
How To Determine Position Controlled Organizations In The Hierarchy? [ID 549628.1]
How Does One Create and/or Update Position and Position Hierarchy in HR Using an API? [ID 736443.1]
Using AME, How To Create Approval Routing To a Certain Position In HR Position Hierarchy [ID 1501433.1]
Regard
Helios -
Position Control of compumotor linear servo table and GV-U6E with PCI-7344
I'm referring PCI-7344 (not 7334).
I have the GV-U6E which is a drive only and does not possess control functionality. the drive only version does not store or use programs. So, serial commands can not be sent through COM port by LabVIEW even though A few basic commands can be emulated.
I am trying to do position control as I mentioned. For example, the motor should move A point to B point exactly with a certain speed. The points must be aboulte position.
I would like you to see the reference comment that I have been contacting with in your website forum.
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000DD490000&USEARCHCONTEXT_CATEGORY_0=_14_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_14_&UCATEGORY_S=0
Regard,
Jin Ho Lee
----- Original Message -----
From:
To:
Sent: Thursday, September 26, 2002 5:00 PM
Subject: Re: (Reference#1549-QYW196) "Position Control of linear servo table and GV-U6E with PCI-7344
>
> Note: Your reference number is included in the Subject field of this
> message. It is very important that you do not remove or modify this
> reference number, or your message may be returned to you.
>
>
> JinHo. Compumotor is a very popular brand, and I know of several customers
> who integrate our 7334 with Computmotor drives. However, when you say that
> the MAX configuration doesn't fit in the compumotor drive settings, are you
> referring to the specs from the 7344? It looks like the 7344 and the
> Compumotor will work well together through a UMI break out box. If you're
> referring to specific commands that the Compumotor receives, I'd have to
> know more about the protocol. If the Compumotor needs serial commands,
> then you can send them through the computer's COM port from LabVIEW.
> Please let me know exactly what kind of configurations you're trying to
> set. The 7344 can be completely configured in MAX and LabVIEW.
>
>
> Best Regards
>
> Kyle Voosen
> Applications Engineer
> National Instruments
> http://www.ni.com/support
>
> ------------------------------------------------------------------------------
>
> Problem Description :
> "Position Control of compumotor 406LXR linear servo table and GV-U6E(motor
> drive) with PCI-7344"
>
> "Since I had the answers referring:
> http://exchange.ni.com/servlet/ ProcessRequest?RHIVEID=101&RPAGEID=135&
> HOID=506500000008000000DD490000& USEARCHCONTEXT_CATEGORY_0=_14_&
> USEARCHCONTEXT_CATEGORY_S=0& UCATEGORY_0=_14_&UCATEGORY_S=0
>
> Wiring step was done well. However, I still have a problem that MAX
> configuration doesn't fit in compumotor drive settings. Therefore, the
> setup is shown below, and I want to know how I can set up PCI-7344
> configuration in MAX or LabVIEW VI.
>
>
> -----------------------------------------------------
>
> Uploaded from device address 0
>
> Gemini GV Servo Drive Setup
>
>
>
> Motor Setup
> DMTR 1703
> Motor ID (406-x-LXR-M-x-D13-x-x-x-x-E5-x-x-x)
> DMTIC 2.48
> Continuous Current (Amps-RMS)
> DMTICD 0.00
> Continuous Current Derating (% derating at rated speed)
> DMTKE 17.6
> Motor Ke (Volts (0-to-peak)/krpm)
> DMTRES 10.10
> Motor Winding Resistance (Ohm)
> DMTJ 119.300
> Motor Rotor Inertia (kg*m*m*10e-6)
> DPOLE 1
> Number of Motor Pole Pairs
> DMTW 40.5
> Motor Rated Speed (rev/sec)
> DMTIP 7.40
> Peak Current (Amps-RMS)
> DMTLMN 3.4
> Minimum Motor Inductance (mH)
> DMTLMX 3.4
> Maximum Motor Inductance (mH)
> DMTD 0.000000
> Motor Damping (Nm/rad/sec)
> DMTRWC 0.23
> Motor Thermal Resistance (degrees Celsius/Watt)
> DMTTCM 20.0
> Motor Thermal Time Constant (minutes)
> DMTTCW 0.33
> Motor Winding Time Constant (minutes)
> DMTAMB 40.00
> Motor Ambient Temperature (degrees Celsius)
> DMTMAX 90.00
> Maximum Motor Winding Temperature (degrees Celsius)
> DHALL 1
> Disable Hall Sensor Checking
> DMTLQS 0
> Set Q Axis Inductance Saturation
> DMTLDS 0
> Set D Axis Inductance Saturation
> DTHERM 0
> Disable motor thermal switch input
>
>
>
> Drive Setup
> DMODE 2
> Drive Control Mode
> DRES 8400
> Drive Resolution (counts/rev)
> DPWM 16
> Drive PWM Frequency (kHz)
> SFB 1
> Encoder Feedback
> ERES 8400
> Encoder Resolution (counts/rev)
> ORES 8400
> Encoder Output Resolution (counts/rev)
> DMEPIT 42.00
> Electrical Pitch (mm)
> SHALL 0
> Invert Hall Sensors
> DMTLIM 1.5
> Torque Limit (Nm)
> DMTSCL 1.5
> Torque Scaling (Nm)
> DMVLIM 119.000000
> Velocity Limit (rev/sec)
> DMVSCL 119.000000
> Velocity Scaling (rev/sec)
>
>
>
> Load Setup
> LJRAT 0.0
> Load-to-Rotor Inertia Ratio
> LDAMP 0.0000
> Load Damping (Nm/rad/sec)
>
>
>
> Fault Setup
> FLTSTP 1
> Fault on Startup Indexer Pulses Enable
> FLTDSB 1
> Fault on Drive Disable Enable
> SMPER 8400
> Maximum Allowable Position Error (counts)
> SMVER 0.000000
> Maximum Allowable Velocity Error (rev/sec)
> DIFOLD 0
> Current Foldback Enable
>
>
>
> Digital Input Setup
> INLVL 11000000
> Input Active Level
> INDEB 50
> Input Debounce Time (milliseconds)
> INUFD 0
> Input User Fault Delay Time (milliseconds)
> LH 0
> Hardware EOT Limits Enable
>
>
>
> Digital Output Setup
> OUTBD 0
> Output Brake Delay Time (milliseconds)
> OUTLVL 0100000
> Output Active Level
>
>
>
> Analog Monitor Setup
> DMONAV 0
> Analog Monitor A Variable
> DMONAS 100
> Analog Monitor A Scaling (% of full scale output)
> DMONBV 0
> Analog Monitor B Variable
> DMONBS 100
> Analog Monitor B Scaling (% of full scale ouput)
>
>
>
> Servo Tuning
> DIBW 1500
> Current Loop Bandwidth (Hz)
> DVBW 100
> Velocity Loop Bandwidth (Hz)
> DPBW 40.00
> Position Loop Bandwidth (Hz)
> SGPSIG 1.000
> Velocity/Position Bandwidth Ratio
> SGIRAT 1.000
> Current Damping Ratio
> SGVRAT 1.000
> Velocity Damping Ratio
> SGPRAT 1.000
> Position Damping Ratio
> DNOTAF 0
> Notch Filter A Frequency (Hz)
> DNOTAQ 1.0
> Notch Filter A Quality Factor
> DNOTAD 0.0000
> Notch Filter A Depth
> DNOTBF 0
> Notch Filter B Frequency (Hz)
> DNOTBQ 1.0
> Notch Filter B Quality Factor
> DNOTBD 0.0000
> Notch Filter B Depth
> DNOTLG 0
> Notch Lag Filter Break Frequency (Hz)
> DNOTLD 0
> Notch Lead Filter Break Frequency (Hz)
> SGINTE 1
> Integrator Option
> SGVF 0
> Velocity Feedforward Gain (%)
> SGAF 0
> Acceleration Feedforward Gain (%)
> -----------------------------------------------------
>
>
> Regards,
> JinHo"
> NI Software :
> LabVIEW version 6.0
> NI Hardware :
> Motion Control device PCI-7344
> Driver Version :
> no
> OS :
> Windows 2000
> CPU :
> Pentium
> RAM :
> 128
> Vendor :
> DELL
> Customer Information :
> Jin Ho Lee
> North Carolina State Univ.
> US
> [email protected]
> Ph: (
> 919
> )
> 512-9929
>
>Yes, we used an NI PXI-7344 motion control card with an NI UMI-7764 box connected to a Gemini GV-U12E servo drive. (which is a drive only.)
We did positional control in absolute position mode.
I can send you an AutoCAD schematic detailing how to connect the UMI-7764 to the Gemini GV servo drive.
In regard to the Rs232 interface to the GV servo drive,
the GV drive only model is "configurable" not "programmable". You can create unique GV configuration files with Compumotor's Motion planner then download the configuration via Rs232 using LabVIEW as desired. Or, using LabVIEW via Rs232 you can change individual GV drive parameters on demand,
or use the GV's two analog outputs back to LabVIEW's analog inputs to measure commanded motor current or torque, etc.etc.etc -
How to include in the sub-menu a table specifies of the user - UDO
hi, forum
how to include in the sub-menu a table specifies of the user
I created a table '@ IA_RELAT' in User-Defined Obejcts but I don't know as including in the sub-menu that I created
it follows my code
Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
Try
<u201DmyTableName->@IA_RELATu201D>
Catch
SBO_Application.MessageBox("The Form already exists")
End Try
End If
thank you
End SubHi David
Excuse me but I didn't find in MenuCreationParams Objects how to do this call of the table '@ IA_RELAT' created in User-Defined Obejcts
It follows my code
in AddMenuItems I set up the Menu and Submenu
in SBO_Application_MenuEvent it is where I am having difficulties of showing the table '@ IA_RELAT' created in User-Defined Obejcts
Thank you for any help
Private Sub AddMenuItems()
Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
oMenuItem = SBO_Application.Menus.Item("43520") 'moudles'
Dim sPath As String
sPath = Application.StartupPath
sPath = sPath.Remove(sPath.Length - 3, 3)
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
oCreationPackage.UniqueID = "MyMenu01"
oCreationPackage.String = "Standard cost"
oCreationPackage.Enabled = True
oCreationPackage.Image = sPath & "UI.bmp"
oCreationPackage.Position = 15
oMenus = oMenuItem.SubMenus
Try ' If the manu already exists this code will fail
oMenus.AddEx(oCreationPackage)
'// Get the menu collection of the newly added pop-up item
oMenuItem = SBO_Application.Menus.Item("MyMenu01")
oMenus = oMenuItem.SubMenus
'// Create s sub menu
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
oCreationPackage.UniqueID = "MySubMenu"
oCreationPackage.String = "Auxiliary Table"
oMenus.AddEx(oCreationPackage)
Catch er As Exception ' Menu already exists
SBO_Application.MessageBox("Menu Already Exists")
End Try
End Sub
Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
Try
SBO_Application.ActivateMenuItem(menus.Item(1).UID.IndexOf("@IA_RELAT"))
Catch
SBO_Application.MessageBox("error")
End Try
End If
End Sub -
How to create screen resolution in bdc table control
hi gurus
can anyone suggest me
how to create screen resolution in bdc table control
thanks®ards
mark.Hi ,
Using CTU_PARAMS table for screen resolution .
For this sample code.
This is for Transation FB60.
report ZZFB60
no standard page heading line-size 255.
tables t100.
PARAMETERS : p_file1 like rlgrap-filename,
p_doctyp like RF05A-BUSCS,
p_invdat like INVFO-BLDAT,
p_posdat like INVFO-BUDAT.
CONSTANTS : C_TRANS_FB60(4) VALUE 'FB60'.
*Parameter string for runtime of CALL TRANSACTION
data : l_option type ctu_params,
l_subrc type sysubrc.
DATA : l_mstring(150).
data accnt type char17.
data : day type char2,
month type char2,
year type char4,
date1 type char10,
date2 type char10.
data : cnt(2) TYPE n,
cnt1 type i,
fld(25) TYPE c.
data : begin of excel occurs 0,
fieldname(255) type c,
end of excel.
DATA:BEGIN OF it_mess OCCURS 0,
msgtyp(5),
lms(200),
msgv1(50),
END OF it_mess.
data: begin of t_record occurs 0,
BUKRS(004),
ACCNT(017),
XBLNR(016),
WRBTR1(016),
WAERS(005),
SECCO(004) ,
SGTXT(050),
HKONT(010),
WRBTR2(017),
MWSKZ(002),
GSBER(004),
KOSTL(010),
end of t_record.
*Internal Table for Header Data
DATA : BEGIN OF t_head OCCURS 0,
BUKRS(004), "Company Code
ACCNT(017), "Account or Vendor
XBLNR(016), "Reference
WRBTR1(017), "Amount in document currency
WAERS(005), "Currency
SECCO(004), "Section Code
SGTXT(050), "Text
END OF t_head.
*Internal table for Item Data
DATA : BEGIN OF t_item OCCURS 0,
ACCNT(017), "Account
HKONT(010), "GL Account
WRBTR2(017), "Line item Amount in document currency
MWSKZ(002), "Tax Code
GSBER(004), " Business Area
KOSTL(010), "Cost centre
END OF t_item.
DATA: IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_BDC_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
*include bdcrecx1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
PERFORM file_selection.
PERFORM data_upload.
PERFORM table_control.
start-of-selection.
l_option-defsize = 'X'.
l_option-dismode = 'A'.
l_option-updmode = 'S'.
day = p_invdat+6(2).
month = p_invdat+4(2).
year = p_invdat+0(4).
concatenate day month year into date1 SEPARATED BY '.'.
day = p_posdat+6(2).
month = p_posdat+4(2).
year = p_posdat+0(4).
concatenate day month year into date2 SEPARATED BY '.'.
*perform open_group.
loop at t_head.
CLEAR IT_BDCDATA.
REFRESH IT_BDCDATA.
perform bdc_dynpro using 'SAPLACHD' '1000'.
perform bdc_field using 'BDC_OKCODE' '=ENTR'.
perform bdc_field using 'BKPF-BUKRS' t_head-bukrs.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'RF05A-BUSCS' p_doctyp.
perform bdc_field using 'INVFO-ACCNT' t_head-accnt.
perform bdc_field using 'INVFO-BLDAT' date1.
perform bdc_field using 'INVFO-BUDAT' date2.
perform bdc_field using 'INVFO-XBLNR' t_head-xblnr.
perform bdc_field using 'INVFO-WRBTR' t_head-wrbtr1.
perform bdc_field using 'INVFO-WAERS' t_head-waers.
perform bdc_field using 'INVFO-SECCO' t_head-secco.
perform bdc_field using 'INVFO-SGTXT' t_head-sgtxt.
cnt = 1.
cnt1 = 1.
loop at t_item where accnt = t_head-accnt.
*if cnt > 4.
*cnt = 4.
*endif.
if cnt1 gt 1.
CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
perform bdc_field using fld 'X'.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE' '=0005'.
endif.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE' '/00'.
CONCATENATE 'ACGL_ITEM-HKONT(' cnt ')' INTO fld.
perform bdc_field using fld t_item-hkont.
CONCATENATE 'ACGL_ITEM-WRBTR(' cnt ')' INTO fld.
perform bdc_field using fld t_item-wrbtr2.
CONCATENATE 'ACGL_ITEM-MWSKZ(' cnt ')' INTO fld.
perform bdc_field using fld t_item-mwskz.
CONCATENATE 'ACGL_ITEM-GSBER(' cnt ')' INTO fld.
perform bdc_field using fld t_item-gsber.
CONCATENATE 'ACGL_ITEM-KOSTL(' cnt ')' INTO fld.
perform bdc_field using fld t_item-kostl.
perform bdc_field using 'BDC_CURSOR' fld.
*CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
*perform bdc_field using fld 'X'.
cnt1 = cnt1 + 1.
*cnt = cnt + 1.
*if cnt > 1.
*perform bdc_dynpro using 'SAPMF05A' '1100'.
*perform bdc_field using 'BDC_OKCODE' '=0005'.
**perform bdc_field using 'BDC_OKCODE' '=0006'.
*endif.
endloop.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE'
'=BS'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
*perform bdc_transaction using 'FB60'.
CALL TRANSACTION C_TRANS_FB60 USING IT_BDCDATA options from l_option
MESSAGES INTO IT_BDC_MESSAGES.
perform error.
perform errordownload.
endloop.
*perform close_group.
*Form data_upload
FORM data_upload .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = p_file1
FILETYPE = 'DAT'
TABLES
DATA_TAB = t_record.
ENDFORM. " data_upload
*Form file_selection
FORM file_selection .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'p_file1'
IMPORTING
file_name = p_file1.
ENDFORM. " file_selection
Form BDC_DYNPRO
FORM BDC_DYNPRO using program dynpro.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROGRAM.
IT_BDCDATA-DYNPRO = DYNPRO.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
endform.
*Form BDC_FIELD
FORM bdc_field using fnam fval.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORM.
Table Control
FORM table_control .
LOOP AT t_record.
ON CHANGE OF t_record-accnt.
MOVE-CORRESPONDING t_record TO t_head.
APPEND t_head.
ENDON.
loop at t_head.
t_item-accnt = t_head-accnt.
t_item-hkont = t_record-hkont.
t_item-wrbtr2 = t_record-wrbtr2 .
t_item-mwskz = t_record-mwskz .
t_item-gsber = t_record-gsber .
t_item-kostl = t_record-kostl.
APPEND t_item.
endloop.
If t_record-level = 'H'.
t_head-bukrs = t_record-text1.
t_head-accnt = t_record-text2.
t_head-xblnr = t_record-text3.
t_head-wrbtr1 = t_record-text4.
t_head-waers = t_record-text5.
t_head-secco = t_record-text6.
t_head-sgtxt = t_record-text7.
APPEND t_head.
else.
t_item-accnt = t_head-accnt.
t_item-hkont = t_record-text1.
t_item-wrbtr2 = t_record-text2.
t_item-mwskz = t_record-text3.
t_item-gsber = t_record-text4.
t_item-kostl = t_record-text5.
APPEND t_item.
endif.
ENDLOOP.
ENDFORM.
FORM error .
LOOP AT IT_BDC_MESSAGES.
IF IT_BDC_MESSAGES-msgtyp = 'E'.
SELECT single * FROM t100 WHERE
sprsl = it_BDC_MESSAGES-msgspra
AND arbgb = IT_BDC_MESSAGES-msgid
AND msgnr = IT_BDC_MESSAGES-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
REPLACE '&2' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
REPLACE '&3' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
REPLACE '&4' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
REPLACE '&' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
REPLACE '&' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
REPLACE '&' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
APPEND it_mess.
ELSE.
it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
APPEND it_mess.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM.
form errordownload.
*down the internal table to excel file.
call function 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'c:/Error.xls'
TABLES
data_tab = it_mess
fieldnames = excel
EXCEPTIONS
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_filename = 6
invalid_pivot_fields = 7
download_problem = 8
others = 9.
endform.
Reward if useful
Regards,
Narasimha
Edited by: narasimha marella on May 13, 2008 12:12 PM -
How to validate the dates in the table control ?
How to validate the dates in the table control ?
Can I write like this ?
LOOP AT it_tab .
CHAIN.
FIELD : it_tab-strtdat,it_tab-enddat.
module date_validation.
ENDCHAIN.
ENDLOOP.
Module Date_validation.
ranges : vdat type sy-datum.
vdat-sign = 'I'.
VDAT-LOW = it_tab-STRTDAT.
VDAT-HIGH = it_tab-ENDDAT.
VDAT-OPTION = 'BT'.
APPEND VDAT.
WHAT CODE I have to write here to validate ?
and If I write like this How can we know which is the current row being add ?
It loops total internal table ..?
Bye,
Muttu.Hi,
I think there is no need to put chain endchain.
To do validation you have to write module in PAI which does required validations.
Thanks
DARSHAN PATEL -
How to delete a column from the table control in module pool?
Hi,
can any one please tell How to delete a column from the table control in module pool?
thanks in advance
warm regards
HareeshKumar Nhi hareesh,
I think it is better to hide it.
How to hide: You can check this link
Dynamic Hide column in table control -
How do I handle a count overflow while running "end's" rotation drive in position control?
Hi everyone!
We run a direct drive in position control mode and normally do oscillating movements i.e. +-10°. The Signal we get is a TTL with 120 counts/°. And with those counts we do our control.
But now we want to run the motor permanent one direction for some days (or 4 ever :-). That means that we get sooner or later a overflow on the count variable. So I think we have a problem when the setpoint is on Overflow -32767 and the Position is 32767. ( I know that I can increase the Integer Value but that does not solve it at the end :-)
How can I handle that?
Is there any programmatic approach?
Thanks for Help!Hi Petric,
I do see the math but that does not help when I have more then one overflow, right?
Well, you have to make sure you NEVER miss such an overflow event. It would be a big problem if you would detect just every second overflow…
I got a big issue when the setpoint is jumping due to overflow! I have to handle that primarly.
Have your control loop work with arbitrary units.
Convert your measurement signal to arbitrary unit with handling overflows in this step.
Convert your control output to output signal handling overflows as well… -
How to include in table of contents the list of figures and list of tables?
How to include in table of content the "Table of contents", "List of figures" and "List of tables"? All are generated with function Table of contents, but they will not appear in generated table of contents even if they have proper style of headings - Heading 1, as other chapter.
I get this in generated Table of contentes of my dissertaion thesis:
Table of contents
Preface
Table of contents <- missing
List of tables <- missing
List of figures <- missing
Introduction
Main
Conclusion
Is it ok, that generated lists are not included in table of contents?You've just confused me.
My understanding of how this is set up is that either:
This is a book, and there is a master TOC that includes all book documents and a document-specific TOC in each component file, or
This is a single file and there is one master TOC that includes all sections and a section-specific TOC that includes only the individual section.
In the first case, I think you would want two TOC styles set up, one that includes the chapter heads (if I understood how you said this worked) for the for the master, and you would include all docs in the book when you generate it, and a second style for the individual chapters, with the subheadings you want to include.
In the second case, it would be similar, but instead of only one style to cover the section TOCS, I think you would need to create a unique set of pargraph styles for the headings in each section (they can all be the same format, based one section, just with unique names), and then make a TOC style for each section that includes only the styles from that section.
OK, wait a sec. I just reread what you said: "Another thing: when the numbers are "linked" and updating well, they display indide a little box. Not a text box, but a kind of little frame around the numbers. That frame makes it imposible to delete just one number: when the TOC says that Section 6.1 is in page 135, for example, you cannot delete just the 5, it deletes, not just the 3 numbers, but also the doted tab."
I think these are NOT normal TOCs created by using Layout > TOC (but you could replace them with ones that are, if you set up your styles properly and the text you want to include is appearing on the pages). Those little boxes you mention sound like cross-references, which should update automatically without any intervention at all. Unfortunately, cross-refs can be flakey, especially if they point to another document. I'd open the cross-refs panel and see if you need to recreate a bunch of links. -
HOW TO MAKE THE CONTENT OF THE TABLE PRINT IN A TABLE CONTROL SCREEN?
Can any one tell me how to make the content of the table control print in a table control screen!!?
Please help!!
I have to make the contents of a table in the table control screen print ? any idea
Regards,
VjPlease refer to Demo Program,
DEMO_DYNPRO_TABCONT_LOOP
Its very clear.
Shreekant -
How to read a current line in table control in dialoug program ?
How to read a current line in table control in dialoug program ?
this code required to provide F4 help.Hi,
You can use the variable <tablecontrol>-Currentline as Ebus says but there is a problem with this.Suppose there are 10 records in the table control with only 5 records visible then when u press a page down and press F4 the first record in page 2, <tablecontrol>-Currentline will have value of 1 instead of 6.So you will need to write a small logic for that.
index = ( <tablecontrol>-topline - <tablecontrol>-currentline ) + 1.
read internal table itab at index.
Hope this helps.
Regards,
Vivek -
URGENT can anyone let me know how to include sort buttons in table maintian
hi
can anyone let me know how to include sort buttons in table maintianence
as generally table maintianec done have sort buttons i need to include the sort buttons kindly let me know on that asap
or can we use module pool in between table maintianece screen
if yes how touse and how to cod for that
regards
AroraYou can change the coding of Table Maintenance.
>> Goto SM30, give table name and goto Display/Maintain mode and copy all the GUI status from standard program into your function group. Add sort button in the GUI Status of Maintain & Display mode.
>> Goto to tablemaintenance screen generated using SE51.
>> Select change mode.
>> After PROCESS BEFORE OUTPUT, create one module to assign your function group program name to " X_HEADER-GUI_PROG = "
>> In PROCESS AFTER INPUT, add another module at the end to perform the action.
-Alpesh.Saparia
Maybe you are looking for
-
How do I use the Japanese fonts in Font Book in a Pages document?
How does one use the Japanese fonts in Font Book in a Pages document. Pages has its own fonts but I cannot get the Japanese fonts into it.
-
I downloaded a large number of sample photos in .psd format. The psd files are about 60megs each. The files open in CS5 Phootshop to what looks like a blank image (light and dark checkerboard squares) possibly what you might expect if you started t
-
System unable to unlock login keychain
I had a very unfortunate problem with adware this morning and used Adwaremedic to remove it. The program prompted me to restart after removing the adware. Now when I log in to my account I have two windows -- one tells me the system was unable to unl
-
IOS 5 Cover Flow really slow on iPhone 4
Hi. Since I updated my iPhone 4 to iOS 5, Cover Flow in Music app is terribly slow... Lag to see the covers. I've heard over there that iOS 5 doesn't reduce the size of the covers to a standard, so the iPhone has to resize them everytime you watch th
-
How to decrease the gap between label and input field.. pls respnd
hi friends, I am facing this problem since long time and couldnt get any solution... pls respnd, i need to decrease the gap between my input field and label.. its very much gap there.. thanks in very advacne, niraja