How to use Min function to get FileName into a Variable
I was wondering how to use MIN function in Evaluate variable in package to get the first file name from the list(Datastore)
With reference to Merging Flat Files into a single file Post number-4
Thanx
Hi Diwakar,
That List data store should be table, than only it will gives the min of the filename string,
If it is a file datastore, Min function does not works properly it will returns a first name in the file data store.
so please, use an interface to upload the List filedatastore into some other temp table. From that table you can use variable to get Min value of file name.
Thanks
Madha
Similar Messages
-
How to use these function modules
Hi all,
can anyone help that how to use these Function modules to update the status of a task, what are all the inputs i required to proceed
1. FC_USER_AUTHORITY_CHECK
<b>2. FC_USER_STATUS_CHECK
3. FC_USER_STATUS_UPDATE</b>
4. FC_USER_GET_CACTI
5. FC_USER_CHECK_FOR_OUTPUT
Thanks in Advance
GaneshHi Rob,
thanks for ur reply,
but they are not clear what they are meant to be, I understood there are some flags needed to run the Function Modules 2 & 3 which are in bold...
but how do i populate them.. i am not getting that..
thanks
ganesh -
Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help
Out of the box, to use the function keys as function keys, hold down the fn key when you press the key. Otherwise, you get the picture function on the key. You can reverse this behavior in the Keyboard system prefs.
-
How to use EVALUATE_AGGR function
Hi,
How to use this function in OBIEE
EVALUATE_AGGR('db_agg_function(%1...%N)' [AS datatype] [, column1, columnN])Hi solved,
i have 3 rows as
a
b
c
i want to get a,b,c for that i used below code
EVALUATE_AGGR('LISTAGG(%3) WITHIN GROUP (order BY %1,%2 DESC)',"KQ_TASK"."ASSIGNED_TO",',',"KQ_TASK"."ASSIGNED_TO")
where %3 is third column which u want to get in single row -
How to use FPRINT32 function in MF cobol
Hi,
How to use FPRINT32 function to check the value of any buffer defined in MF cobol code.
When we tried, CALL FPRINT32 USING OUTPUT-FML
OUTPUT-FML is a buffer which is defined in our cobol code.
We are getting below error.
ld: 0711-224 WARNING: Duplicate symbol: p_xargc
ld: 0711-224 WARNING: Duplicate symbol: p_xargv
ld: 0711-224 WARNING: Duplicate symbol: .tpsvrdone
ld: 0711-224 WARNING: Duplicate symbol: .tpsvrinit
ld: 0711-224 WARNING: Duplicate symbol: TPSVRINIT
ld: 0711-224 WARNING: Duplicate symbol: .TPSVRINIT
ld: 0711-224 WARNING: Duplicate symbol: tpsvrinit
ld: 0711-224 WARNING: Duplicate symbol: tpsvrdone
ld: 0711-224 WARNING: Duplicate symbol: .userlog
ld: 0711-224 WARNING: Duplicate symbol: userlog
ld: 0711-224 WARNING: Duplicate symbol: p_xrcfg
ld: 0711-224 WARNING: Duplicate symbol: p_xrc
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: .FPRINT32
CMDTUX_CAT:1832: ERROR: can't execute cobcc -I$TUXDIR/include -L/lib -lpthreads -L/usr/local/opt/oracle/product/ostl133/lib/ -lclntsh -lrtl -lld -lm /lib/crt0_64.o -ldl -lc -lm -lpthreads -lodm -lbsd_r -lld -lperfstat -lm -lc_r -lpthreads /usr/local/opt/oracle/product/ostl133/precomp/lib/cobsqlintf.o /usr/local/opt/oracle/product/ostl133/lib/libclntsh.a -C linkcount=1024 -o BS-f804a.c -L${TUXDIR}/lib TPSVRINIT.o -brtl -qstaticinline -lcobatmis -ltux -lbuft -lfml -lfml32 -lengine -lpthread
Please help in this regard,
ThanksHi,
As far as I know there is no FPRINT32 function in the Tuxedo COBOL interface.
The ATMI COBOL Function Reference for the latest Tuxedo 11.1.1.2.0 release at
http://download.oracle.com/docs/cd/E18050_01/tuxedo/docs11gr1/rf3cbl/rf3cbl.html shows FINIT, FINIT32, FVFTOS, FVFTOS32, FVSTOF, and FVSTOF32 as the only supported COBOL interface functions related to FML.
COBOL is better suited to dealing with the fixed record structure of views than with the variable record format of FML buffers. The COBOL interface offers functions to initialize and FML buffer and to convert an FML buffer to and from a VIEW so that preexisting services taking FML buffers as input or output parameters can be called, but the expectation is that the COBOL program will conver the FML buffer to a VIEW before accessing it.
It is possible to call the Tuxedo C interface Fprint32() function from COBOL using standard interlanguage calling conventions. Also, you may want to check with other developers on your project to see if someone may have already implemented such a function.
Regards,
Ed -
How to use Aggregate Functions during Top N analysis?
Say i want to find top 5 highest salaries and their totals and average. In that case how to use aggregate functions. Please give me an example on this.
Regards,
Renu
Message was edited by:
user642387Hi,
Yes, you can do that with aggregate functions.
First, do a sub-query to retrieve all the salaries (in descending order), then say "WHERE ROWNUM <= 5" in the main query. Use the aggregate SUM and AVG functions in the main query.
Analytic functions are easier to use for jobs like this, once you get familiar with them. If you're not leaving the field this month, then it's probably worthwhile for you to get familiar with analytic functions. -
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 analytic function to get the right output.
Dear all;
I have the following sample date below
create table temp_one
id number(30),
placeid varchar2(400),
issuedate date,
person varchar2(400),
failures number(30),
primary key(id)
insert into temp_one values (1, 'NY', to_date('03/04/2011', 'MM/DD/YYYY'), 'John', 3);
insert into temp_one values (2, 'NY', to_date('03/03/2011', 'MM/DD/YYYY'), 'Adam', 7);
insert into temp_one values (3, 'Mexico', to_date('03/04/2011', 'MM/DD/YYYY'), 'Wendy', 3);
insert into temp_one values (4, 'Mexico', to_date('03/14/2011', 'MM/DD/YYYY'), 'Gerry', 3);
insert into temp_one values (5, 'Mexico', to_date('03/15/2011', 'MM/DD/YYYY'), 'Zick', 9);
insert into temp_one values (6, 'London', to_date('03/16/2011', 'MM/DD/YYYY'), 'Mike', 8);this is output I desire
placeid issueperiod failures
NY 02/28/2011 - 03/06/2011 10
Mexico 02/28/2011 - 03/06/2011 3
Mexico 03/14/2011 - 03/20/2011 12
London 03/14/2011 - 03/20/2011 8All help is appreciated. I will post my query as soon as I am able to think of a good logic for this...hI,
user13328581 wrote:
... Kindly note, I am still learning how to use analytic functions.That doesn't matter; analytic functions won't help in this problem. The aggregate SUM function is all you need.
But what do you need to GROUP BY? What is each row of the result set going to represent? A placeid? Yes, each row will represent only one placedid, but it's going to be divided further. You want a separate row of output for every placeid and week, so you'll want to GROUP BY placeid and week. You don't want to GROUP BY the raw issuedate; that would put March 3 and March 4 into separate groups. And you don't want to GROUP BY failures; that would mean a row with 3 failures could never be in the same group as a row with 9 failures.
This gets the output you posted from the sample data you posted:
SELECT placeid
, TO_CHAR ( TRUNC (issuedate, 'IW')
, 'MM/DD/YYYY'
) || ' - '|| TO_CHAR ( TRUNC (issuedate, 'IW') + 6
, 'MM/DD/YYY'
) AS issueperiod
, SUM (failures) AS sumfailures
FROM temp_one
GROUP BY placeid
, TRUNC (issuedate, 'IW')
;You could use a sub-query to compute TRUNC (issuedate, 'IW') once. The code would be about as complicated, efficiency probably won't improve noticeably, and the the results would be the same. -
How to use the Function module 'BAPI_APPRAISAL_GETDETAIL'
hello friends,
I have to create the report which displays appraisee name, appraiser name,reviewer name and result.Using BAPI_APPRAISAL_GETDETAIL we can get the above all.But i don't know how to use the above function module.If anyone have used in their program could you please send me or anyone have idea how to do that Please help.It is very Urgent Help me.
Thanks in advance,
Regards,
Ashok.Hi,
I do not hae the code but i can tell you how you use the FM and get the required data, please follow the below mentioned steps:
1) In this Bapi you need to pass the Plan verison and Object Id data in the BAPI Import parameters and while passing the these values need to decalra the data variables same (of use the same reference fields as they are in Bapi import fields)as they are Bapi importing data fields.
2) decalre the Internal Table structure as they are in the Export and Table parameters.
3) Assign the decalred Import and Tables structures to the BAPI FM.
4) once the Bapi is run with the Import parameters data the Apprisal data and Apprisee data will returened in the import and table structures and also return value wll be imported.
5) now using the Structures which are in Import and Table decalrations in the FM you can retrieve the data by reading them.
Do let me know if you need any more details in this regard.
Raghotham Reddy.
If you find this is the right solution then allocate reward point. -
How to use ABS function when using BWA connection
Hi Experts,
We are using InfoSpace on top of BWA
Could you kindly let me know how to use ABS functionality for InfoSpace
Because we want to use formula: (A-B) / Abs(B), we cannot get ABS (B)
Would you kindly help on this?
Best regards
Alex yangrepost
-
hi frs
how to use nullif function.
i have used like below
<?FTE_COUNT div nullif (FT_COUNT+PT_COUNT+PI_COUNT+TEMP_COUNT+I_COUNT),0)?>but not getting it.
help pls.Hi,
try <?xdofx: FTE_COUNT div decode(FT_COUNT+PT_COUNT+PI_COUNT+TEMP_COUNT+I_COUNT,0,null,FT_COUNT+PT_COUNT+PI_COUNT+TEMP_COUNT+I_COUNT)?>
Regards
Rainer -
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 -
How to use SD_VBAK_ARRAY_READ functional module
hello
can you please tell me how to use SD_VBAK_ARRAY_READ functional module. that means what i have to pass and what i should get.
Please help meHi Ravi,
i want to display vkorg,kunnr,and some other fields from the VBAK. User enters VKORG and some other fields but VKORG is compulsory.
so i written the code like this.
TYPES :BEGIN OF TEITAB_VBAK,
VKORG type VBAK-VKORG,
KUNNR TYPE VBAK-KUNNR,
VBELN TYPE VBAK-VBELN,
AUDAT TYPE VBAK-AUDAT,
VDATU TYPE VBAK-VDATU,
ERNAM TYPE VBAK-ERNAM,
END OF TEITAB_VBAK.
DATA: ITAB_VBAK TYPE TABLE OF TEITAB_VBAK,
WA_VBAK TYPE TEITAB_VBAK.
SELECT-OPTIONS: s_VKORG FOR P_VKORG OBLIGATORY, " Sales Organization
s_KUNNR FOR P_KUNNR, " Sold-to party.
s_VBELN FOR P_VBELN, " Sales Document.
s_MATNR FOR P_MATNR, " Material number.
s_AUDAT FOR P_AUDAT, " Document Date (Date Received/Sent).
s_VDATU FOR P_VDATU, " Requested delivery date.
s_ERNAM FOR P_ERNAM, " Name of Person who Created the Object.
s_VKAUS FOR P_VKAUS. " Usage indicator.
SELECT VKORG KUNNR VBELN AUDAT VDATU ERNAM
FROM VBAK
INTO CORRESPONDING FIELDS OF TABLE ITAB_VBAK
WHERE VKORG IN S_VKORG AND AUART EQ 'ZRA'.
CALL FUNCTION 'SD_VBAK_ARRAY_READ'
EXPORTING
I_BYPASSING_BUFFER = ' '
I_REFRESH_BUFFER =
TABLES
IT_VBAK_KEY =
ET_VBAK =
EXCEPTIONS
RECORDS_NOT_FOUND = 1
RECORDS_NOT_REQUESTED = 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.
so i confused where to call this fucntional module and what to pass. That means call this functional module before the select query or after the select query and what to pass.
i am new in ABAP.
Please help me to solve this problem . -
How to use read_text function module
Hi how to use read_text function module to read purchase order header text .what are all tht things to pass in ID,Name and Object
thanks,
MaheDear,
Use below code.
DATA:IT_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE,
V_TDNAME LIKE THEAD-TDNAME.
V_TDNAME = PO_NUMBER.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
ID = 'F01'
LANGUAGE = 'EN'
NAME = V_TDNAME
OBJECT = 'EKKO'
TABLES
LINES = IT_LINE.
Thanks and Regards, -
How do I re-open and get back into my iPhoto if this message appears: "Your photo library is either in use by another application or has become unreadable"? What do I do?
Rebuild your iPhoto Library:
iPhoto 6 and later: Rebuilding the iPhoto library
Maybe you are looking for
-
Hi, I have two datasets (each contain three tables joined together, different filter criteria in each dataset) in my ODI interface on which I perform the MINUS SET commad. The results from this are to be written to a file. When I run the pure SQL in
-
Do you think I have my DNS set up correctly?
Hi I have bought a macmini server running the latest OSX software. I plan to host my own website and email from it. My ISP has given me a static ip address and I plan to set up my advanced DNS settings as follows, though I have used fake url & ip add
-
My 27 inch iMac monitor tilts forward and will not hold position when I adjust it up.. Is there a tension adjustment for the monitor position?
-
Best custom video settings for QT on iPod
What are the best Custom video settings for creating a QT video via iMovie for use with the iPod? That is to say, I want to d/l from a Camcorder and then convert that to Quicktime...ultimately to be played on the iPod. Thanks, Lyman
-
Hi There Can someone let me know the standard payables invoice status list or point me in the direction where I can find it? I did take a look on the web but didn't seem to be able to track it down. Thanks