Using Move function in parabolic function
I am looking at moving an object as a function of a quadratic equation- y=x*x
Hence, need to be able to provide more than xfrom, yfrom and xTo and yTo - else it moves the object in a straight line from initial to final path. How do I provide the linkage? I am keen on using the Move vs changing the x,y positions incrementally as the result is much smoother
Many Thanks, Shongrunden
I did the following - does the job reasonably well- still not sure whether it does my parabolic function right- I am looking for something that can do
x=a*t
y=b*t-c*t*t
How do I know the underlying function behind <s:Power easeInFraction=".5" exponent="2"> to tweak it just right?
<s:Linear
easeInFraction="0" easeOutFraction="0" id="linear"/>
<s:Power easeInFraction=".5" exponent="2" id="power"/>
<s:Parallel id="ballmove1" target="{car}">
<s:Animate easer="{linear}" duration="2500">
<s:SimpleMotionPath property="x" valueFrom="10" valueTo="400"/>
</s:Animate>
<s:Animate easer="{power}" duration="2500">
<s:SimpleMotionPath property="y" valueFrom="500" valueTo="10"/>
</s:Animate>
</s:Parallel>
<s:Parallel id="ballmove2" target="{car}">
<s:Animate easer="{linear}" duration="2500">
<s:SimpleMotionPath property="x" valueFrom="400" valueTo="800"/>
</s:Animate>
<s:Animate easer="{power}" duration="2500">
<s:SimpleMotionPath property="y" valueFrom="10" valueTo="500"/>
</s:Animate>
</s:Parallel>
Similar Messages
-
Is there a way to load a movie file created using FlattenMovie() function ?
Is there a way to load a movie file created using FlattenMovie() function ? I tried with NewMovieFromFile() , everything went well but the movie video track somehow had been corrupted.
The thing is I could nicely convert the original Movie data structure using an export component. But the one I recreated after saving disk did not converted well ( It produced only sound ). Plz help I seached all over the documents to unerstand 'How to use flattened files' but could not.Hi telsenbroich,
Have a look at this response
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=506500000005000000269A0100&HTHREAD=000104998&UCATEGORY_0=_8_&UCATEGORY_S=0
Regards
Ray Farmer
Regards
Ray Farmer -
I have problem with convesion from cartesian coordinate system to other one. I need use standard move function for example blend to moving 2 arms manipulator. What i need to do?
The vector move will probably not give the results you are looking for. The vector move calculates the trajectory based on unit vectors in cartesian space. For a 2 arm robot (ex. 2 rotation joints), you would be able to move from point A to point B as desired, however the path would not be a straight line. The path may also not be suitable for the mechanism, which could cause a collision or maybe a singularity.
The best solution is probably the contour move. You can use the inverse kinematic routine you wrote and send the results to a contour move. Contour moves are a little more complicated to use than the simple one axis or vector moves, however they are also much more flexible. I do not know of any functions already written for your system,
but it sounds like you are already on the right path.
Regards,
Brent Runnels
Applications Engineer
National Instruments -
I am going to run tests that require an actuator to move using various types of arbitrary waveforms such as sine or square. The NI 7344 is hooked to the UMI that is going through a driver for a servo valve. The loop is analog and it is closed. I have played with some of the examples but can't get it to work. I have used the function generator VI to generate a signal but I think I am using the wrong input VI to the motion control board. When I use what I have it moves the servo and then stops. It doesn't continually generate the signal.
I would love to use the controls on the function generator vi to control frequency and amplitude ect. Any help or pointer would be helpful. Thank you in advance.Hello,
I'm not clear on exactly how you want to use the generated data but I'm assuming they will be used as your target points.
There's a built-in example for motion called 'One-Axis Contour Move.vi'. This example demonstrates how to provide your target points as 1-D array. All you need to do is to replace the input array with the output of the function generator. In order to have it run continuously, use a while loop. You can further program your application so that it'll change the waveform on the fly by monitoring the user interface but this might be little little tricky as you will need to reset the move and load the new generated points while keeping track of your current position.
I hope this helps. Let me know if you have further questions regarding this
application.
Best regards,
Yusuf C.
Applications Engineering
National Instruments -
How to use SO_OBJECT_SEND function module
Hi friends,
how to use SO_OBJECT_SEND function module in 4.0B Server .hi
good
check this code
REPORT ZTSAPMAIL.
DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.
DATA: BEGIN OF X_OBJECT_HD_CHANGE.
INCLUDE STRUCTURE SOOD1.
DATA: END OF X_OBJECT_HD_CHANGE.
DATA: BEGIN OF X_OBJCONT OCCURS 10.
INCLUDE STRUCTURE SOLI.
DATA: END OF X_OBJCONT.
DATA: BEGIN OF X_OBJHEAD OCCURS 0.
INCLUDE STRUCTURE SOLI.
DATA: END OF X_OBJHEAD.
DATA: BEGIN OF RAW_HEAD.
INCLUDE STRUCTURE SORH.
DATA: END OF RAW_HEAD.
DATA: BEGIN OF X_RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOOS1.
DATA: END OF X_RECEIVERS.
PARAMETERS: RECEIVER LIKE X_RECEIVERS-RECNAM. " Name
*BUILD MESSAGE HEADER
MOVE 'Sort field goes here' TO X_OBJECT_HD_CHANGE-OBJSRT. " Sort field
MOVE 'Name of the object goes here' TO X_OBJECT_HD_CHANGE-OBJNAM. " Name
MOVE 'Document title goes here' TO X_OBJECT_HD_CHANGE-OBJDES. " Title
MOVE 'F' TO X_OBJECT_HD_CHANGE-OBJSNS. " Functional OBJECT
MOVE 'E' TO X_OBJECT_HD_CHANGE-OBJLA. " Language
Object type of the new document
MOVE 'RAW' TO X_OBJECT_TYPE.
CLEAR X_OBJCONT.
MOVE 'Contents of mail' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
CLEAR X_OBJCONT-LINE. APPEND X_OBJCONT.
MOVE 'More contents' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
MOVE 'Still more contents'
to x_objcont-line.
APPEND X_OBJCONT.
MOVE ' ' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
Specific header (Dependent on the object type, here RAW)
REFRESH X_OBJHEAD.
DESCRIBE TABLE X_OBJCONT LINES RAW_HEAD-RAWSIZ.
MOVE RAW_HEAD TO X_OBJHEAD.
APPEND X_OBJHEAD.
*RECEIVERS table
CLEAR X_RECEIVERS.
REFRESH X_RECEIVERS.
MOVE RECEIVER TO X_RECEIVERS-RECNAM. " Name
MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type
MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
APPEND X_RECEIVERS.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
folder_id = 'OUTBOX'
forwarder = x_forwarder
object_fl_change = x_object_fl_change
OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE
object_id = x_object_id
OBJECT_TYPE = X_OBJECT_TYPE
OUTBOX_FLAG = 'X'
OWNER = SY-UNAME
store_flag = x_store_flag
importing
object_id_new = x_object_id_new
sent_to_all = x_sent_to_all "May need to use
TABLES
OBJCONT = X_OBJCONT
OBJHEAD = X_OBJHEAD
objpara = x_objpara
objparb = x_objparb
RECEIVERS = X_RECEIVERS.
reward point if hlepful.
thanks
mrutyun^ -
How to use percentage functions in BEx with structures
Hi, I need a help.
I have a query with a structure in the rows: two characteristics at left then the structure.
Plant, Year/Month and a structure with 3 lines (Line A = movement type = 1, 2, 3, Line B types 4, 5, 6, Line C types 7, 8, 9).
In the rows just a quantity.
I'm trying to use percentage functions CT or GT in the rows, but it's not working.
The idea is something like:
Plant 01 07/2010 Line A 30 30%
Line B 20 20%
Line C 50 50%
Result 33%
08/2010 Line A 40 20%
Line B 60 30%
Line C 100 50%
Result 66%.
When I do not use the structure percentage function works well, but with the structure results are completely wrong.
Any help will be appreciated.
César MenezesYou either have to use exception aggregation to give you the total per plant and use that in your percentage calculation, or you could define a formula in the cells. Here you can reference the specific cells you want to use as inputs.
-
Using modular functions with movieclips
hi guys, this morning i was looking a tutorial that shows how to make modular functions, the user only used numbers, i was wandering if there is a way to use this with movieclips or childs.
The example was:
function addNumber(num1:Number, num2:Number, num3:Number):void
trace(num1+num2*num3);
addNumber(3, 4, 7);
i tried using a movieclip called cuadro and triying to move on the x axis, but it didnt work out:
function mObj(obj1:MovieClip, num1:Number):void
obj1.x = num1;
addNumber(cuadro, 50);
any sugestion?
thnks in advanceoh sorry my bad, i was trying another stuff
i know that the last line must say
mObj(cuadro, 50);
what im trying to do is use the function with some objects in the stage, and for example when i press the first button, it will write mObj(cuadro1, 50) , button2 mObj(cuadro2, 80), so i can use the same function for diferents objects -
How to use this function call function 'REUSE_ALV_COMMENTARY_WRITE' in alv
hi all
thanks in advance
how to use this function in alv programming
call function 'REUSE_ALV_COMMENTARY_WRITE'
why use and what purpose use this function plz tell me details
plz guide me
thanksHi
see this exmaple code where i had inserted a LOGO by useing this FM
*& Report ZTEST_ALV_LOGO
REPORT ztest_alv_logo.
TYPE-POOLS : slis.
*ALV Formatting tables /structures
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: gt_events TYPE slis_t_event.
DATA: gs_layout TYPE slis_layout_alv.
DATA: gt_page TYPE slis_t_listheader.
DATA: gs_page TYPE slis_listheader.
DATA: v_repid LIKE sy-repid.
*ALV Formatting work area
DATA: w_fieldcat TYPE slis_fieldcat_alv.
DATA: w_events TYPE slis_alv_event.
DATA: gt_bsid TYPE TABLE OF bsid WITH HEADER LINE.
INITIALIZATION.
PERFORM build_events.
PERFORM build_page_header.
START-OF-SELECTION.
*perform build_comment. "top_of_page - in initialization at present
SELECT * FROM bsid INTO TABLE gt_bsid UP TO 10 ROWS.
*perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
*USING = Row, Column, Field name, display length, table name, heading
*OR
PERFORM build_fieldcat.
gs_layout-zebra = 'X'.
*top of page event does not work without I_callback_program
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_structure_name = 'BSID'
i_background_id = 'ALV_BACKGROUND'
i_grid_title = 'This is the grid title'
I_GRID_SETTINGS =
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
TABLES
t_outtab = gt_bsid.
Form..............: populate_for_fm
Description.......: Populates fields for function module used in ALV
FORM populate_for_fm USING p_row
p_col
p_fieldname
p_len
p_table
p_desc.
w_fieldcat-row_pos = p_row. "Row Position
w_fieldcat-col_pos = p_col. "Column Position
w_fieldcat-fieldname = p_fieldname. "Field name
w_fieldcat-outputlen = p_len. "Column Lenth
w_fieldcat-tabname = p_table. "Table name
w_fieldcat-reptext_ddic = p_desc. "Field Description
w_fieldcat-input = '1'.
APPEND w_fieldcat TO gt_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " populate_for_fm
*& Form build_events
FORM build_events.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events.
READ TABLE gt_events
WITH KEY name = slis_ev_user_command
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_user_command TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
READ TABLE gt_events
WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_top_of_page TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
ENDFORM. " build_events
*& Form USER_COMMAND
When user command is called it uses 2 parameters. The itab
passed to the ALV is in whatever order it currently is on screen.
Therefore, you can read table itab index rs_selfield-tabindex to get
all data from the table. You can also check r_ucomm and code
accordingly.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
READ TABLE gt_bsid INDEX rs_selfield-tabindex.
error checking etc.
SET PARAMETER ID 'KUN' FIELD gt_bsid-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDFORM. "user_command
*& Form top_of_page
Your own company logo can go here if it has been saved (OAOR)
If the logo is larger than the size of the headings in gt_page,
the window will not show full logo and will have a scroll bar. Thus,
it is a good idea to have a standard ALV header if you are going to
use logos in your top of page.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_page
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
*& Form build_fieldcat
*Many and varied fields are available here. Have a look at documentation
*for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
FORM build_fieldcat.
w_fieldcat-fieldname = 'BUDAT'.
w_fieldcat-seltext_m = 'Dte pst'.
w_fieldcat-ddictxt(1) = 'M'.
w_fieldcat-edit = 'x'.
Can change the position of fields if you do not want them in order
of the DDIC or itab
w_fieldcat-row_pos = '1'.
w_fieldcat-col_pos = '10'.
APPEND w_fieldcat TO gt_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " build_fieldcat
*& Form build_page_header
gt_page is used in top of page (ALV subroutine - NOT event)
*H = Header, S = Selection, A = Action
FORM build_page_header.
For Headers, Key is not printed and is irrelevant. Will not cause
a syntax error, but is not used.
gs_page-typ = 'H'.
gs_page-info = 'Header 1'.
APPEND gs_page TO gt_page.
gs_page-typ = 'H'.
gs_page-info = 'Header 2'.
APPEND gs_page TO gt_page.
For Selections, the Key is printed (bold). It can be anything up to 20
bytes. It gets printed in order of code here, not by key value.
gs_page-typ = 'S'.
gs_page-key = 'And the winner is:'.
gs_page-info = 'Selection 1'.
APPEND gs_page TO gt_page.
gs_page-typ = 'S'.
gs_page-key = 'Runner up:'.
gs_page-info = 'Selection 2'.
APPEND gs_page TO gt_page.
For Action, Key is also irrelevant.
gs_page-typ = 'A'.
gs_page-info = 'Action goes here'.
APPEND gs_page TO gt_page.
ENDFORM. " build_page_header -
Using TRUNC function on partitioned column
Hi All,
I have a table as follows:
STEP1
CREATE TABLE TEST_PARTITION
EMP_ID VARCHAR2(10 BYTE),
CREATE_DT DATE,
EMP_RGN_NM VARCHAR2(2 BYTE),
DSPTCH_CNT NUMBER
PARTITION BY RANGE (CREATE_DT)
SUBPARTITION BY LIST(EMP_RGN_NM)
SUBPARTITION TEMPLATE(
SUBPARTITION RGN_E VALUES ('E') ,
SUBPARTITION RGN_MW VALUES ('MW') ,
SUBPARTITION RGN_SW VALUES ('SW') ,
SUBPARTITION RGN_W VALUES ('W') ,
SUBPARTITION RGN_SE VALUES ('SE')
PARTITION aug2008 VALUES LESS THAN (TO_DATE('01-Sep-2008', 'DD-MON-YYYY')),
PARTITION sep2008 VALUES LESS THAN (TO_DATE('01-Oct-2008', 'DD-MON-YYYY')),
PARTITION oth VALUES LESS THAN (MAXVALUE)
ENABLE ROW MOVEMENT;
STEP 2
insert into TEST_PARTITION values(1000,TO_DATE('01-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10)
insert into TEST_PARTITION values(1000,TO_DATE('02-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',20);
insert into TEST_PARTITION values(1000,TO_DATE('03-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',0);
insert into TEST_PARTITION values(1000,TO_DATE('01-sep-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
insert into TEST_PARTITION values(1000,TO_DATE('02-sep-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
insert into TEST_PARTITION values(1000,TO_DATE('01-Oct-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
insert into TEST_PARTITION values(1001,TO_DATE('01-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',1);
insert into TEST_PARTITION values(1001,TO_DATE('02-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',2);
insert into TEST_PARTITION values(1001,TO_DATE('03-Aug-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',0);
insert into TEST_PARTITION values(1001,TO_DATE('01-sep-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
insert into TEST_PARTITION values(1001,TO_DATE('02-sep-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',5);
insert into TEST_PARTITION values(1001,TO_DATE('01-Oct-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
insert into TEST_PARTITION values(1001,TO_DATE('02-Oct-2008 12:02:02', 'DD-MON-YYYY HH:MI:SS'),'SE',10);
STEP 3
I need to get all the dispatches on 1st of August and hence issue the statement as follows:
select * from test_partition where TRUNC(CREATE_DT)='01-Aug-2008' and EMP_RGN_NM = 'SE'
Using a function over the partitioned column, will it avaoid partition pruning? I mean will it scan all the partitiones instead of going to specific partition?
I need this urgently since we are having a discussion on this in few minutes from now.
Thanks so much
SaffWhat about a function based index ?
SQL> select * from test_partition where TRUNC(CREATE_DT)='01-Aug-2008' and EMP_RGN_NM = 'SE';
Execution Plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 32 | 4 (0)| | |
| 1 | PARTITION RANGE ALL | | 1 | 32 | 4 (0)| 1 | 3 |
| 2 | PARTITION LIST SINGLE| | 1 | 32 | 4 (0)| KEY | KEY |
| 3 | TABLE ACCESS FULL | TEST_PARTITION | 1 | 32 | 4 (0)| KEY | KEY |
Note
- 'PLAN_TABLE' is old version
SQL> create index idx on test_partition (TRUNC(CREATE_DT));
Index created.
SQL> select * from test_partition where TRUNC(CREATE_DT)='01-Aug-2008' and EMP_RGN_NM = 'SE';
Execution Plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1 | 32 | 2 (0)| | |
| 1 | TABLE ACCESS BY GLOBAL INDEX ROWID| TEST_PARTITION | 1 | 32 | 2 (0)| ROWID | ROWID |
| 2 | INDEX RANGE SCAN | IDX | 1 | | 1 (0)| | |
Note
- 'PLAN_TABLE' is old version
I need this urgently since we are having a discussion on this in few minutes from now.It is not our problem, but yours.
Nicolas. -
How to use the function module ....
hi
how to use the function module ssf_function_module_name in smartformsHi..
If you are using this Function module, you can get the generated function module name of smartform dynamically. It is good progrmaming practice to get the fucntion module name dynamically because there might be some problems if you are hard coding in program.
This will return the name of the function module and then from the exporting parameters you can use the fucntion module name to pass parameters to Smartforms.
Check this link.I am expalining here how to use this function module.
https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=36109&version=2
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
<b>Reward points if useful</b>
Regards
Ashu -
Archiving using PBS Function modules
Hi All,
I am converting existing report to archiving reports.
For that I am using <b>PBS Commands FUNCTION MODULES</b>. .
ie function module like <b>'/PBS/SELECT_INTO_TABLE'</b>
Can any one send some documents related PBS and how to use these commands or function modules,and sample programs.
thanks in advance..
srinu.Hi ,
Thanks for your help and responce.
I already coded one small program using commands . but its not working properly in perticular case.
Here is the Code.
From EKKO table the fucntion module fetching the data properly.
SELECT SINGLE * FROM EKKO
INTO W_EKKO
WHERE EBELN EQ P_EBELN.
IF SY-SUBRC NE 0.
CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
EXPORTING
ARCHIV 'CMM'
OPTION ''
TABNAME = 'EKKO'
SCHL1_NAME = 'EBELN'
SCHL1_VON = P_EBELN
SCHL1_BIS = P_EBELN
TABLES
I_TABELLE = TAB20
EXCEPTIONS EOF = 4
OTHERS = 2.
LOOP AT TAB20 WHERE ( EBELN EQ P_EBELN ).
MOVE-CORRESPONDING TAB20 TO W_EKKO .
EXIT.
ENDLOOP.
ENDIF.
<b><u>But when I use the function module to fetch from EKPO, its considering only EBELN , but not considering the EBELP .</u></b>
Its fetching all the line items related to this EBELN.
SELECT * UP TO 1 ROWS
INTO CORRESPONDING FIELDS
OF TABLE TAB23
FROM EKPO
WHERE EBELN EQ W_EKKO-EBELN
AND EBELP EQ P_EBELP.
ENDSELECT.
if sy-subrc ne 0.
CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
EXPORTING
ARCHIV = 'CMM'
OPTION = ''
TABNAME = 'EKPO'
SCHL1_NAME = 'EBELN'
SCHL1_VON = W_EKKO-EBELN
SCHL1_BIS = W_EKKO-EBELN
SCHL2_NAME = 'EBELP'
SCHL2_VON = P_EBELP
SCHL2_BIS = P_EBELP
TABLES
I_TABELLE = TAB23
EXCEPTIONS EOF = 4
OTHERS = 2.
LOOP AT TAB23 WHERE ( EBELN EQ W_EKKO-EBELN AND
EBELP EQ P_EBELP ).
MOVE TAB23-ebelp TO W_EKPO-ebelp.
ENDLOOP .
endif.
<u>Please check my code and give me some inputs.
Is there any pre-conditions are needed.</u>
Thanks and Regards,
Srinivas Kalva. -
USE OF FUNCTION MODULE 'REUSE_ALV_FIELDCATALOG_MERGE'
HI all ,
Please help me with this function module :
<b>'REUSE_ALV_FIELDCATALOG_MERGE'</b>
How to use this function module ?The function REUSE_ALV_FIELDCATALOG_MERGE is used for retrieve a catalog from a table defined in DDICT. Then you can modify it as you want. You can see an example in BALV* programs demos.
Example:
in the program J_1AINFG is called as:
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' =20
EXPORTING =20
i_internal_tabname =3D TABLEINT
i_structure_name =3D 'J_1AIFALVHDR' =20
CHANGING =20
ct_fieldcat =3D i_fieldcat[]. =20
where i_structure name is defined in DDICT. Then you can add, delete, or modify masks, lengths, etc. properties of fields in this table.
In a program if u need to add lot of fields
LOOP AT i_fieldcat INTO wa_fieldcat. =20
MOVE wa_fieldcat TO wa_auxfieldcat. =20
CASE wa_fieldcat-col_pos. =20
WHEN 27. =20
CLEAR wa_fieldcat. =20
wa_fieldcat-fieldname =3D 'COEFIC1'. =20
wa_fieldcat-tabname =3D g_tabname_header. =20
wa_fieldcat-col_pos =3D 27. =20
wa_fieldcat-seltext_s =3D 'Coef.Per.'. =20
wa_fieldcat-seltext_m =3D 'Coefic.Per=EDodo'. =20
wa_fieldcat-seltext_l =3D 'Coeficiente del Per=EDodo'. =20
wa_fieldcat-outputlen =3D 9. =20
wa_fieldcat-just =3D 'R'. =20
APPEND wa_fieldcat TO auxcatalogo. =20
ADD 1 TO wa_auxfieldcat-col_pos. =20
ENDCASE.
ENDLOOP.
i_fieldcat[] =3D auxcatalogo[]. -
How to use 'SO_NEW_DOCUMENT_SEND_API1' function module
Hello Experts,
Please anybody tell me how to use 'SO_NEW_DOCUMENT_SEND_API1' function modulehi,
umesh see below code copy it and compile it and see how it works!!
REPORT ZSEND_SMS.
parameters: sms_num type text20 obligatory.
parameters: subject type SO_OBJ_DES default sy-sysid.
parameters: sms_txt type text50 obligatory.
data: receivers like somlreci1 occurs 0 with header line,
objhead like solisti1 occurs 0 with header line,
objtxt like solisti1 occurs 0 with header line,
p_rec like receivers-receiver,
p_type like receivers-rec_type.
*users like ywf_ea_user_task occurs 0 with header line.
data: count type i,
p_email(50),
doc_chng like sodocchgi1,
objcont like solisti1 occurs 5 with header line,
p_count(5).
start-of-selection .
clear receivers.
refresh receivers.
receivers-receiver+9 = 'SMS'.
receivers-receiver+13 = sms_num.
move 'K' to receivers-rec_type.
append receivers.
clear doc_chng.
doc_chng-obj_descr = subject. "Subject zpravy
doc_chng-obj_name = 'SMS'.
doc_chng-doc_size = strlen( doc_chng-obj_descr ).
refresh objtxt.
objtxt = 'SMS message'. "message
append objtxt.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_type = 'RAW'
document_data = doc_chng
commit_work = 'X'
tables
object_header = objhead
object_content = objtxt
receivers = receivers
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.
if sy-subrc ne 0.
message e208(00) with 'Error'.
endif.
Hope magic Works!
Regards,
Purvesh. -
How to use the function module /IRM/IPBB_AGREEMENT_CREATE.
Hi all,
Please help me how to use the function module /IRM/IPBB_AGREEMENT_CREATE.
It is a Vistex fuction module which is used to create Sales contract in SAP-Vistex. If anyone has use the function module and do have the sample code please share it.
Thanks.FORM create_agreement TABLES pt_agreement
CHANGING po_agreement .
CONSTANTS: c_strt_knumh TYPE knumh VALUE '0000000000'.
DATA: lc_kona TYPE /irm/s_gkona,
lc_cbasp TYPE /irm/s_ipcbasp,
lt_cbapr TYPE /irm/t_ipcbapr, "Partners
lc_cbapr TYPE /irm/s_ipcbapr,
lt_cbadt TYPE /irm/t_ipcbadt, "Dates
lc_cbadt TYPE /irm/s_ipcbadt,
lt_cbafs TYPE /irm/t_ipcbafs,
lc_cbafs TYPE /irm/s_ipcbafs,
lt_cbacn TYPE /irm/t_ipcbacn,
lc_cbacn TYPE /irm/s_ipcbacn,
lt_cbacl TYPE /irm/t_ipcbacl,
lc_cbacl TYPE /irm/s_ipcbacl,
lt_cbtpv TYPE /irm/t_ipagtpv,
lc_cbtpv TYPE /irm/s_ipagtpv,
lt_texts TYPE text_lh,
lc_texts TYPE itclh,
lt_cbasd TYPE /irm/t_ipcbasd,
lc_cbasd TYPE /irm/s_ipcbasd,
lc_agreement TYPE /irm/s_ipcbasp_doc,
lc_e_log_number TYPE balognr,
lt_messages TYPE /irm/t_gprolog.
DATA: lt_vake TYPE cond_vakevb_t,
lc_vake TYPE LINE OF cond_vakevb_t,
lt_konh TYPE /irm/t_gkonh,
lc_konh TYPE LINE OF /irm/t_gkonh,
lt_konp TYPE /irm/t_gkonp,
lc_konp TYPE LINE OF /irm/t_gkonp,
lt_konw TYPE /irm/t_gkonwu,
lc_konw TYPE LINE OF /irm/t_gkonwu,
lt_konm TYPE /irm/t_gkonmu,
lc_konm TYPE LINE OF /irm/t_gkonmu,
lt_komg TYPE /irm/t_gkomg_index,
lc_komg TYPE LINE OF /irm/t_gkomg_index,
lt_user_data TYPE /irm/t_gpraxfu_index,
lc_user_data TYPE LINE OF /irm/t_gpraxfu_index.
DATA: lc_updt(1) TYPE c.
DATA: lc_knumh TYPE knumh.
DATA: BEGIN OF lc_str_knumh,
hd(2) TYPE c VALUE '$$',
inc_num(8) TYPE c,
END OF lc_str_knumh.
DATA: blank_agree_key TYPE knuma VALUE '~~~~~~~~~~'.
FIELD-SYMBOLS <konh_line> LIKE LINE OF lt_konh.
FIELD-SYMBOLS <konp_line> LIKE LINE OF lt_konp.
DATA: lc_rule TYPE type_key_rule.
READ TABLE pt_agreement INTO lc_rule INDEX 1.
SELECT SINGLE * FROM kona
WHERE vkorg = lc_rule-vkorg
AND vtweg = '10'
AND spart = '10'
AND boart = 'ZPS1'
AND botext = lc_rule-sap_agkey.
IF sy-subrc = 0.
lc_updt = 'U'.
ELSE.
lc_updt = 'I'.
ENDIF.
LOOP AT pt_agreement INTO lc_rule.
MOVE sy-tabix TO lc_str_knumh-inc_num.
CONDENSE lc_str_knumh-inc_num NO-GAPS.
WHILE lc_str_knumh-inc_num+7(1) = ' '.
CONCATENATE '0' lc_str_knumh-inc_num INTO lc_str_knumh-inc_num.
CONDENSE lc_str_knumh-inc_num NO-GAPS.
ENDWHILE.
CONCATENATE '$$' lc_knumh INTO lc_knumh.
MOVE lc_str_knumh TO lc_knumh.
MOVE c_strt_knumh TO lc_knumh.
CLEAR: lc_konh, lc_konp, lc_komg.
MOVE: lc_rule-vkorg TO lc_komg-komg-vkorg,
'10' TO lc_komg-komg-vtweg,
'10' TO lc_komg-komg-spart,
p_waers TO lc_komg-komg-waerk,
'1300' TO lc_komg-komg-bukrs,
lc_rule-lifnr TO lc_komg-komg-lifnr,
lc_knumh TO lc_komg-knumh,
lc_knumh TO lc_konh-knumh,
lc_knumh TO lc_konp-knumh,
lc_rule-datab TO lc_konh-datab,
lc_rule-datbi TO lc_konh-datbi.
CASE lc_rule-tablnam.
WHEN 'A701'. "Every Agreement will have a A701 rule -
"Therefore we acn setup the header using A701
MOVE: 'New ' TO lc_kona-knuma,
lc_rule-vkorg TO lc_kona-vkorg,
'10' TO lc_kona-vtweg,
'10' TO lc_kona-spart,
'ZPS1' TO lc_kona-boart,
'C' TO lc_kona-abtyp,
'V' TO lc_kona-kappl,
p_waers TO lc_kona-waers,
lc_rule-knuma_ag TO lc_kona-abrex,
'ZPS2' TO lc_kona-kobog,
lc_rule-datab TO lc_kona-datab,
lc_rule-datbi TO lc_kona-datbi,
lc_rule-sap_agkey TO lc_kona-botext,
'1300' TO lc_kona-bukrs,
'I' TO lc_kona-updkz.
MOVE: 'New ' TO lc_cbasp-knuma_ag,
'ZPS1' TO lc_cbasp-boart_ag,
p_waers TO lc_cbasp-waers,
'A' TO lc_cbasp-setl_mth,
'B' TO lc_cbasp-setl_typ,
'A2' TO lc_cbasp-ident,
'E' TO lc_cbasp-setlm,
'ZPDA' TO lc_cbasp-pargr,
'X' TO lc_cbasp-npric,
'LF' TO lc_cbasp-stprl,
lc_rule-lifnr TO lc_cbasp-stpar,
lc_rule-contract_rev TO lc_cbasp-rvnum,
'I' TO lc_cbasp-updkz.
CONCATENATE: blank_agree_key
lc_rule-lifnr INTO lc_konh-vakey.
MOVE: lc_rule-lifnr TO lc_konp-lifnr.
WHEN 'A703'.
CONCATENATE: blank_agree_key
lc_rule-kunnr INTO lc_konh-vakey.
MOVE lc_rule-kunnr TO lc_komg-komg-kunnr.
WHEN 'A709'.
CONCATENATE: blank_agree_key
lc_rule-zzprodh1 lc_rule-zzprodh2 lc_rule-zzprodh3
lc_rule-zzprodh4 lc_rule-zzprodh5 INTO lc_konh-vakey.
CONCATENATE: lc_rule-zzprodh1 lc_rule-zzprodh2 lc_rule-zzprodh3
lc_rule-zzprodh4 lc_rule-zzprodh5 INTO lc_komg-komg-prodh.
WHEN 'A710'.
CONCATENATE: blank_agree_key
lc_rule-matkl INTO lc_konh-vakey.
MOVE lc_rule-matkl TO lc_komg-komg-matkl.
WHEN 'A711'.
CONCATENATE: blank_agree_key
lc_rule-matnr INTO lc_konh-vakey.
MOVE lc_rule-matnr TO lc_komg-komg-matnr.
IF lc_rule-kschl = 'ZPPL'.
MOVE: 'C' TO lc_konp-krech,
'CAD' TO lc_konp-konwa.
lc_konp-kbetr = lc_rule-net_po_price * 1.
ENDIF.
WHEN 'A717'.
WHEN 'A718'.
CONCATENATE: blank_agree_key
lc_rule-zzextwg INTO lc_konh-vakey.
MOVE lc_rule-zzextwg TO lc_komg-komg-zzextwg.
WHEN 'A719'.
CONCATENATE: blank_agree_key
lc_rule-werks INTO lc_konh-vakey.
MOVE lc_rule-werks TO lc_komg-komg-werks.
WHEN 'A721'.
CONCATENATE: blank_agree_key
lc_rule-kunnr lc_rule-werks INTO lc_konh-vakey.
MOVE: lc_rule-kunnr TO lc_konp-kunnr,
lc_rule-kunnr TO lc_komg-komg-kunnr.
WHEN 'A722'.
CONCATENATE: blank_agree_key
lc_rule-vkbur INTO lc_konh-vakey.
MOVE lc_rule-vkbur TO lc_komg-komg-vkbur.
WHEN 'A724'.
CONCATENATE: blank_agree_key
lc_rule-kunnr lc_rule-vkbur INTO lc_konh-vakey.
MOVE: lc_rule-kunnr TO lc_konp-kunnr,
lc_rule-kunnr TO lc_komg-komg-kunnr,
lc_rule-vkbur TO lc_komg-komg-vkbur.
ENDCASE.
MOVE: 'A' TO lc_konh-kvewe,
lc_rule-tablnam+1(3) TO lc_konh-kotabnr,
lc_rule-kappl TO lc_konh-kappl,
lc_rule-kschl TO lc_konh-kschl.
REPLACE ALL OCCURRENCES OF '~' IN lc_konh-vakey WITH ' '.
APPEND lc_konh TO lt_konh.
CLEAR lc_konh.
*--- Add in the KONP.Do we need to add
MOVE: lc_rule-kappl TO lc_konp-kappl,
lc_rule-kschl TO lc_konp-kschl,
'G' TO lc_konp-krech.
IF lc_rule-kschl+3(1) = '%'.
MOVE: 'A' TO lc_konp-krech,
'%' TO lc_konp-konwa.
lc_konp-kbetr = lc_rule-rebate_perc * 1.
ENDIF.
APPEND lc_konp TO lt_konp. CLEAR lc_konp.
APPEND lc_komg TO lt_komg. CLEAR lc_komg.
ENDLOOP.
IF lc_updt = 'I'.
CALL FUNCTION '/IRM/IPCB_AGREEMENT_CREATE'
EXPORTING
I_MESSAGES_DISPLAY = ' '
I_SAVE_MESSAGES = ' '
I_COMMIT_WORK = 'X'
I_CALL_FROM_WS = ' '
is_kona = lc_kona
is_cbasp = lc_cbasp
it_cbapr = lt_cbapr
it_cbadt = lt_cbadt
it_cbafs = lt_cbafs
it_cbacn = lt_cbacn
it_cbacl = lt_cbacl
it_cbtpv = lt_cbtpv
it_texts = lt_texts
it_cbasd = lt_cbasd
IMPORTING
es_agreement = lc_agreement
e_log_number = lc_e_log_number
TABLES
t_messages = lt_messages
CHANGING
CT_VAKE = lt_vake
ct_konh = lt_konh
ct_konp = lt_konp
CT_KONW = lt_konw
CT_KONM = lt_konm
ct_komg = lt_komg
CT_USER_DATA = lt_usr_data
EXCEPTIONS
no_documents_to_process = 1
no_authorization = 2
creation_failed = 3
new_pricing_not_maitained = 4
OTHERS = 5.
IF sy-subrc <> 0.
Implement suitable error handling here
ELSE.
MOVE: lc_agreement-knuma_ag TO po_agreement,
lc_agreement-knuma_ag TO lc_kona-knuma.
ENDIF.
APPEND LINES OF lt_messages TO gt_messages.
ELSE.
MOVE-CORRESPONDING kona TO lc_kona.
ENDIF.
LOOP AT lt_konh ASSIGNING <konh_line>.
MOVE lc_kona-knuma TO <konh_line>-vakey+0(10).
move '&' to <konh_line>-knumh+0(1).
ENDLOOP.
LOOP AT lt_konp ASSIGNING <konp_line>.
MOVE lc_kona-knuma TO <konp_line>-vakey+0(10).
move '&' to <konh_line>-knumh+0(1).
ENDLOOP.
lc_kona-updkz = 'U'.
lc_cbasp-updkz = 'U'.
CLEAR lt_messages.
CALL FUNCTION '/IRM/IPCB_AGREEMENT_CHANGE'
EXPORTING
I_MESSAGES_DISPLAY = ' '
I_SAVE_MESSAGES = ' '
I_COMMIT_WORK = 'X'
I_INIT_DATA = 'X'
is_kona = lc_kona
is_cbasp = lc_cbasp
it_cbapr = lt_cbapr
it_cbadt = lt_cbadt
it_cbafs = lt_cbafs
it_cbacl = lt_cbacl
it_cbacn = lt_cbacn
IT_FIELDS =
it_texts = lt_texts
IMPORTING
e_log_number = lc_e_log_number
TABLES
t_messages = lt_messages
CHANGING
cs_agreement = lc_agreement
CT_VAKE = lt_vake
ct_konh = lt_konh
ct_konp = lt_konp
CT_KONW = lt_konw
CT_KONM = lt_konm
ct_komg = lt_komg
CT_USER_DATA = lt_usr_data
EXCEPTIONS
no_documents_to_process = 1
no_authorization = 2
change_failed = 3
agreement_locked = 4
OTHERS = 5.
IF sy-subrc <> 0.
Implement suitable error handling here
ENDIF.
APPEND LINES OF lt_messages TO gt_messages.
ENDFORM. " CREATE_AGREEMENT -
hi experts,
i have been using SO_DOCUMENT_SEND_API1 function module to send a mail, i have sucessfully used it to send a mail but the subject line of the mail is coming empty. i want to display some text in it, how can it possibleHello ,
Goto to the SE37 and open the FM and
Goto -> Documentation...
This is the way to check the properties of FM related to Subject in Email
And also look at this program....
FORM mail_body.
DATA: l_l1 TYPE i.
CONSTANTS: lc_0 VALUE '0',
lc_1 VALUE '1',
lc_raw(3) TYPE c VALUE 'RAW'.
REFRESH: i_objtxt[],
i_objpack[].
CLEAR: wa_objtxt.
SORT i_fail BY type.
* MAIL BODY
* Customer Number
CONCATENATE text-t18
w_kunnr
INTO wa_objtxt
SEPARATED BY space.
APPEND wa_objtxt TO i_objtxt.
CLEAR wa_objtxt. "blank line
APPEND wa_objtxt TO i_objtxt.
* Complete Payment Doc Nos
wa_objtxt = text-t16.
APPEND wa_objtxt TO i_objtxt.
CLEAR: wa_fail, wa_objtxt.
APPEND wa_objtxt TO i_objtxt.
MOVE: text-t23 TO wa_objtxt,
text-t24 TO wa_objtxt+17(5),
text-t25 TO wa_objtxt+22(6),
text-t26 TO wa_objtxt+40(18).
APPEND wa_objtxt TO i_objtxt.
CLEAR wa_objtxt.
LOOP AT i_fail INTO wa_fail WHERE type EQ c_comp.
DIVIDE wa_fail-disper BY 100.
MOVE: wa_fail-belnr TO wa_objtxt,
wa_fail-buzei TO wa_objtxt+17(5),
wa_fail-wrbtr TO wa_objtxt+22(16),
wa_fail-disper TO wa_objtxt+40(18).
APPEND wa_objtxt TO i_objtxt.
CLEAR: wa_fail, wa_objtxt.
ENDLOOP.
* MAIL BODY-LENGTH
DESCRIBE TABLE i_objtxt LINES l_l1.
CLEAR wa_objpack-transf_bin.
wa_objpack-head_start = lc_1.
wa_objpack-head_num = lc_0.
wa_objpack-body_start = lc_1.
wa_objpack-body_num = l_l1.
wa_objpack-doc_type = lc_raw.
APPEND wa_objpack TO i_objpack.
*SUBJECT
CLEAR wa_doc_chng.
wa_doc_chng-obj_name = text-t15.
wa_doc_chng-obj_descr = text-t15.
ENDFORM. " mail_body
*& Form send_mail
* text
FORM send_mail.
CONSTANTS: lc_c TYPE so_escape VALUE 'C',
lc_mode(3) TYPE c VALUE 'INT'.
CLEAR: wa_reclist, i_reclist[].
*Recipient list
wa_reclist-receiver = text-t14. "DL
wa_reclist-rec_type = lc_c.
APPEND wa_reclist TO i_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = c_x
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
TABLES
packing_list = i_objpack
* OBJECT_HEADER =
* CONTENTS_BIN =
contents_txt = i_objtxt
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
* IF SY-SUBRC 0.
* ENDIF.
IF sy-subrc IS INITIAL.
*Send mail immediately
SUBMIT rsconn01 USING SELECTION-SET lc_mode AND RETURN.
CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.
ELSE.
RAISE mail_not_sent.
ENDIF.
ENDFORM. " send_mail
Maybe you are looking for
-
Hi! First of all I appologize for posting a similar question in another forum. I think this one is the right place. Im trying to connect to a PIX 501 with easy vpn in nem mode with a ASA 5505. Currently running 7.2.2-22 (had to download a interim rel
-
HT5622 Why is my Apple ID or password not working anymore after I reset my password?
Why is my Apple ID or password not working anymore after I reset my password? It keep asking my password... I have reset it, then, when I enter the new password, it's not accepted...
-
HT4796 link to migration assistant doesn't work. Where can I find it?
link to migration assistant doesn't work. Where can I find it?
-
Issues monitoring the 2602i Cisco AP with Zabbix.
Hi! My workplace just bought a lot of Cisco AP (2602i) and a WLC 2500 and I'm in deep trouble trying to monitor them with Zabbix, wich is the SW we use for our whole Network. After a lot of time I got to monitor the CPU use (in %), traffic of each in
-
How to pick a video from gallery with wp8.1 and wp8.0
I found this article https://msdn.microsoft.com/en-us/library/windows/apps/jj655411.aspx where a file is filtered by type and picked up. Is it possible to do that with video in wp8.1? I tried with a third party library (cordova) and is not possible t