Shell program, check for interactive login
hey, i'm fairly new to *nix programming in general
i want fortune to run for users at login time,
however i can't just slap fortune into the .bashrc file b/c that will not provide sftp a 'clean' environment for the added output to a noninteractive session messes up ssh do to its unix like implementation of things
anyway my question is a simple one, how do i check for an interactive session, where there is a tty attached to the standard input, or however it makes sense to be said.
i picked up an o'reilly bash ebook through my library but haven't had a chance to read it yet, so an example code snippet would be helpful if possible
thanks for the help
neolution wrote:anyway my question is a simple one, how do i check for an interactive session, where there is a tty attached to the standard input, or however it makes sense to be said.
That very question can be answered with :
tty -s && fortune
However, I'm not sure if this solves your problem, since sftp may actually provide a tty ... I simply don't have any experience with sftp.
i picked up an o'reilly bash ebook through my library but haven't had a chance to read it yet, so an example code snippet would be helpful if possible
and since you intend to read up, I can only encourage you to do so, and I won't give an explanation of the above, so you have something to read up ;-)
Similar Messages
-
Extended Program check for internal table
TYPES:BEGIN OF TY_FINAL,
VBELN TYPE VBAP-VBELN,
VBELV TYPE VBAP-VBELV,
POSNV TYPE VBAP-POSNV,
WERKS TYPE VBAP-WERKS,
ZZ_MODEL_NO TYPE VBAP-ZZ_MODEL_NO,
VKORG TYPE VBAK-VKORG,
TEXT(70) TYPE C,
END OF TY_FINAL.
Declaration of Variables *
DATA: IT_VBAK TYPE STANDARD TABLE OF TY_VBAK ,
IT_VBAP TYPE STANDARD TABLE OF TY_VBAP ,
IT_FINAL TYPE STANDARD TABLE OF TY_FINAL WITH HEADER LINE.
DATA: W_VBAK TYPE TY_VBAK ,
W_VBAP TYPE TY_VBAP ,
W_FINAL TYPE TY_FINAL ,
W_LAYOUT TYPE SLIS_LAYOUT_ALV ,
W_VARIANT_SAVE TYPE C ,
W_REPID TYPE SY-REPID .
In the above code i have declared IT_FINAL TYPE STANDARD TABLE OF TY_FINAL WITH HEADER LINE. in extended program check iam getting error as( Tables with headers are no longer supported in the OO context.
can any one plz suggest me to avoid this error.
Thanks in Advance.
Moderator message - Duplicate post locked
Edited by: Rob Burbank on May 19, 2009 9:12 AMHi,
DATA: IT_VBAK TYPE STANDARD TABLE OF TY_VBAK ,
IT_VBAP TYPE STANDARD TABLE OF TY_VBAP ,
" If you declare the internal table with header line in OO context it wll give you error. As OO wil not
" support the header line concept. Declare Internal table without header line and create the work area
" for the internal table
IT_FINAL TYPE STANDARD TABLE OF TY_FINAL. " WITH HEADER LINE.
DATA: W_VBAK TYPE TY_VBAK ,
W_VBAP TYPE TY_VBAP ,
W_FINAL TYPE TY_FINAL , " Use this work area
W_LAYOUT TYPE SLIS_LAYOUT_ALV ,
W_VARIANT_SAVE TYPE C ,
W_REPID TYPE SY-REPID -
Extended Program check for multipl programes in single run
Hello All,
I wan to do the syntax check for multiple programs at single execution run.
SAP has provided SLIN transaction for single program, Is there any SAP standard transaction similar as SLIN for multiple program check at single execution run?
Thanks,
Feroz.>
s feroz wrote:
> I need it in R/34.6b version.
I don't think you have much option there -
Hi
I have the following problem (hopefully rather simple but I'm new to SQL*Plus and PL/SQL):
I execute a batch file b.bat (under windows) that in turn executes a SQL-script s.sql via
sqlpus /nolog @s.sql.
The script then tries to CONNECT user/pwd@service, does it's stuff and exits.
If user/pwd is a valid login, all is fine, but it would like the batch to know whether the login was successful or not, for example with a signal file. I can use spool to send information into a file but it gets created even when the login fails so what I'm looking for is a way that creates a file if and only if the login was successful (so that the batch just has to test for it's existence and not analyse it's content). I have tried PL/SQL which gives me "IF"-statements that will probably help me determine wheter the login was successful, but could not execute a spool command from there.You could use WHENEVER SQLERROR and check the return status of SQL*Plus
http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1014742 -
How to check for user login in a header?
What is a good way to make sure the user has logged in on many web pages? I implement the property and method in the session bean to keep track of whether the user has logged in or not and that's fine. I tried to use a Page Fragment to check if the user is logged in, but Page Fragment does not seem to redirect with getExternalContext().redirect("Login.jsp").
I also tryed to use <jsp:include> to include a header to test for login, but JSF doesn't seem to like me adding that to the page (got error).
Also, is there a good way to prevent the target page to even execute the rowset if the user is not logged in? It seem like the page has to complete all the rowset data binding before being redirected to another page, even if I put the redirection as part of the page initialization. This is difficult because I can't expect all the pages to have query result when the user is not even logged in.
This is very basic web application function but it seems so hard to do with Studio Creator.One thought though, when I was playing around with that solution I noticed that everything gets filtered.
i.e. images, so maybe you chould place some thing on the page (image) and when it comes through .. do something. I know its not quite as good, because your back to having to put something on each page (or restricted pages).
The images won't be wrong, unlike the URL .. maybe not images maybe something else. good luck
Jonathan -
Checking for files in a folder -- Wrong output
Hi guys,
I'm writing a simple program, I have to check for 6 files (hardcoded, they will never change) if they are in certain directories/paths.
The problem is, I think I have a problem in my IF statements, because it continueally returns false.
The paths are on networked drives, does that make a difference?
I'm rather stuck on this one, any help would be appreaciated.
(some paths/file names have been replaced by "xxxxxxxxx", for security)
* Checks for files in a directory, prints results.
* @author Mitchell
* @version 0.2
* @date 28 Jul '05
import java.awt.*;
import java.io.*;
import java.lang.Object;
import javax.swing.*;
import java.util.*;
public class FileCheck extends JFrame
//declare filenames/paths, add more if needed.
String fileName1 = "file it2_load.txt";
String fileName2 = "mo_batch.txt";
String fileName3 = "mo_bcp.txt";
String fileName4 = "mo_load.txt";
String fileNameX = "IT2_1000_yyyymmdd.txt";
String fileNameY = "IT2_2000_yyyymmdd.txt";
//declare directories to search
String fileLocation1 = "\\\\xxxxxxxxx\\aus_bear\\Patrol";
String fileLocation2 = "\\\\xxxxxxxxx\\nz_bear\\Patrol";
String fileLocation3 = "\\\\xxxxxxxxx\\bear\\remote\\RTS";
String fileLocation4 = "\\\\xxxxxxxxx\\bear\\remote\\RTS";
//declares array for filename storage. Change if needed.
File fileNamesArray1[];
File fileNamesArray2[];
File fileNamesArray3[];
File fileNamesArray4[];
//set path to find files
File filePath1 = new File(fileLocation1);
File filePath2 = new File(fileLocation2);
File filePath3 = new File(fileLocation2);
File filePath4 = new File(fileLocation2);
//string buffer to store results
StringBuffer results = new StringBuffer();
//start of FileCheck method
public FileCheck()
//collects all filenames from pre-set path1
fileNamesArray1 = filePath1.listFiles();
results.append("This program checks for files in given folders."
+"\nTRUE = File does exist in folder."
+"\nFALSE = File does not exist in folder.\n\n");
results.append(fileLocation1 + "\n");
//start for loop1 - check for pre-set filenames in path1
for(int i=0; i < fileNamesArray1.length; i++)
if( fileName1.equals(fileNamesArray1.toString()))
results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
else if( fileName2.equals(fileNamesArray1[i].toString()))
results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
else if( fileName3.equals(fileNamesArray1[i].toString()))
results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
else if( fileName4.equals(fileNamesArray1[i].toString()))
results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
else
results.append("PATH1 >> " + fileNamesArray1[i] + " >> FALSE\n");
} //end for loop1
//collects all filenames from pre-set path2
fileNamesArray2 = filePath2.listFiles();
results.append("\n" + fileLocation2 + "\n");
//start for loop2 - check for pre-set filenames in path2
for(int j=0; j < fileNamesArray2.length; j++)
if( fileName2.equals(fileNamesArray2[j].toString()))
results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
else if( fileName2.equals(fileNamesArray2[j].toString()))
results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
else if( fileName3.equals(fileNamesArray1[j].toString()))
results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
else if( fileName4.equals(fileNamesArray1[j].toString()))
results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
else
results.append("PATH2 >> " + fileNamesArray2[j] + " >> FALSE\n");
} //end for loop2
//collects all filenames from pre-set path1
fileNamesArray3 = filePath3.listFiles();
results.append("\n" + fileLocation3 + "\n");
//start for loop3 - check for pre-set filenames in path1
for(int k=0; k < fileNamesArray3.length; k++)
if( fileNameX.equals(fileNamesArray3[k].toString()))
results.append("PATH3 >> " + fileNamesArray3[k] + " >> TRUE\n" + fileNamesArray3[k].lastModified());
else
results.append("PATH3 >> " + fileNamesArray3[k] + " >> FALSE\n");
} //end for loop3
//collects all filenames from pre-set path4
fileNamesArray4 = filePath3.listFiles();
results.append("\n" + fileLocation4 + "\n");
//start for loop4 - check for pre-set filenames in path1
for(int l=0; l < fileNamesArray4.length; l++)
if( fileNameY.equals(fileNamesArray4[l].toString()))
results.append("PATH4 >> " + fileNamesArray4[l] + " >> TRUE\n" + fileNamesArray4[l].lastModified());
else
results.append("PATH4 >> " + fileNamesArray4[l] + " >> FALSE\n");
} //end for loop4
//construct displaybox for results
JTextArea textArea = new JTextArea( results.toString() );
textArea.setEditable(false); //disables modification of results
Container container = getContentPane();
container.add( new JScrollPane( textArea ) );
setSize( 500, 500 ); // set window size
setVisible( true ); //allow visibility
//main
public static void main (String args[])
FileCheck window = new FileCheck();You could try using the File.exists() method.
The paths are on networked drives, does that make a difference?Try the above on a local file and a networked file.
I'm writing a simple program, Actually a simple program would be something like:
File file = new File("xxx");
System.out.println(file.exists());No need to include all the code you posted.
http://www.physci.org/codes/sscce.jsp -
Extended program check ( sapslin prog)
Hi,
i have one requirement, in extended program check for checking the text elements,(chracter -strings).
There is a sap standard programavailabel. ( Code slin,function pool sapslin) , if i am checking EPC for my z program ,the sapling is not comparing the text elements and text literals character by character,It is checking whether the text element is created or not.(for example if i created a text literal as "cat" and for that if i created text element as "ca". ) then also the EPC (sapslin) is not identifying that error.
please guide me with the proper code.REPORT ZTEXT_ELEMENTS_CHECK .
include <icon>.
PARAMETERS : P_TEXT(40) TYPE C.
TYPES : BEGIN OF TY_RESULT,
id type c,
key(3) type c,
ENTRY TYPE STRING,
STATUS TYPE C,
END OF TY_RESULT.
DATA : LEN TYPE I,
POS TYPE I,
ACTLEN TYPE I,
COMPLEN TYPE I,
count type i,
STR TYPE STRING.
DATA : BEGIN OF TY_PROG.
INCLUDE STRUCTURE ABAPTEXT.
DATA : END OF TY_PROG.
data : i_data type table of abaptext with header line.
DATA : I_PROGRAM TYPE TABLE OF ABAPTEXT WITH HEADER LINE.
DATA : I_TEXTELEMENT TYPE TABLE OF TEXTPOOL WITH HEADER LINE.
DATA : I_RESULT TYPE TABLE OF TY_RESULT WITH HEADER LINE.
READ REPORT P_TEXT INTO I_data.
READ TEXTPOOL P_TEXT INTO I_TEXTELEMENT LANGUAGE SY-LANGU.
break-point.
loop at i_data.
if I_data-LINE cp '00'.
i_program-line = i_data-line.
append i_program.
endif.
endloop.
LOOP AT I_TEXTELEMENT.
LOOP AT I_PROGRAM.
SEARCH I_PROGRAM-LINE FOR I_TEXTELEMENT-ENTRY.
IF SY-SUBRC EQ 0.
LEN = STRLEN( I_TEXTELEMENT-ENTRY ) + 1.
POS = SY-FDPOS.
STR = I_PROGRAM+POS(LEN).
SHIFT STR RIGHT DELETING TRAILING ''''.
CONDENSE STR NO-GAPS.
ACTLEN = STRLEN( I_TEXTELEMENT-ENTRY ).
COMPLEN = STRLEN( STR ).
IF ACTLEN = COMPLEN.
I_RESULT-ENTRY = I_TEXTELEMENT-ENTRY.
I_RESULT-STATUS = 'T'.
APPEND I_RESULT.
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
loop at i_result.
loop at i_textelement where entry = i_result-entry or id = ''.
i_result-id = i_textelement-id.
i_result-key = i_textelement-key.
modify i_result from i_result.
endloop.
endloop.
loop at i_textelement where id = 'I'.
clear count.
loop at i_result where key = i_textelement-key.
count = 1.
endloop.
if count = 0.
i_result-id = i_textelement-id.
i_result-key = i_textelement-key.
i_result-entry = i_textelement-entry.
i_result-status = 'F'.
append i_result.
endif.
endloop.
LOOP AT I_RESULT.
if i_result-status = 'F'.
WRITE : /3 I_RESULT-id, 15 I_RESULT-key,
30 I_RESULT-ENTRY, 40 I_RESULT-STATUS,ICON_INCOMPLETE AS ICON
endif.
ENDLOOP.
Hope it is useful.
Please reward. -
Hi ,
I'm getting errors(Obsolete statements) when checking for extended program check for a report program.
When I'm going for "UCCHECK" i'm not getting any errors & in code inspector also it is not showing the errors.
Here what is the reason for this?why it showing error in one transaction & not showing the same in other transaction..
Here I'm pasting the code..
REPORT ZHCM_OBSOLETE.
infotypes : 0000.
DATA: BEGIN OF itab1 OCCURS 0,
col1 TYPE i,
col2 TYPE i,
col3 TYPE string,
END OF itab1 VALID BETWEEN col1 AND col2.
DATA: BEGIN OF itab2 OCCURS 0,
col1 TYPE i,
col2 TYPE i,
col3 TYPE string,
END OF itab2 VALID BETWEEN col1 AND col2.
itab1-col1 = 1.
itab1-col2 = 6.
itab1-col3 = 'Itab1 Int1'.
APPEND itab1 TO itab1.
itab1-col1 = 9.
itab1-col2 = 12.
itab1-col3 = 'Itab1 Int2'.
APPEND itab1 TO itab1.
itab2-col1 = 4.
itab2-col2 = 11.
itab2-col3 = 'Itab2 Int1'.
APPEND itab2 TO itab2.
provide col3 FROM itab1
col3 FROM itab2
BETWEEN 2 AND 14.
WRITE: / itab1-col1.
* \, itab1-col2, itab1-col3, itab1_valid.
WRITE: / itab2-col1.
* , itab2-col2, itab2-col3, itab2_valid.
SKIP.
ENDPROVIDE.
Thanks in advance..
Pradeepa
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:22 PMHi,
You are probably getting obsolete statements on the declaration of internal tables. Avoid using begin of itab occurs 0, this statement is not used as it automatically creates a header line. Use types statement to define a type and then use it to create an internal table and workarea, this will remove the obsolete statements in extended program check.
types : begin of t_itab,
col1 type i,
col2 type i,
col3 type string,
end of t_itab.
data itab type table of t_itab
data wa_type t_itab.
Use these to populate your internal table.
begin of itab occurs 0 was a statement which was used in prior versions (<4.0) and now are considered obsolete, but still functional due to backward compatibility.
Hope this helps you.
Regards,
Sachin Dargan.
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:22 PM -
Error while Extended Program Check
Dear All,
When I m cheking Extended Program Check for my program i m getting following warning error how can i clear it.
Not all supported date formats are handled
Check use of a generic service method or handle all formats
Regards
Balamurugan NHello,
Please check which date format is causing the Problem in your code and Try to use Standard function Modules like
CONVERT_DATE_FORMAT etc which suffice your Problem and later do check Extended Program check.
Please let us know, if you resolve by other ways.
Thanks ,
Sudheer. -
Standard Program for Interactive Forms
Hi all,
I want to see the Print Preview of any of a Standard Interactive Form.
Please Give me Some Standard Programs which call the Interactive forms..
Thank you.Hi,
I think you need to create a custom program to check the print preview.
Check following link to create a print program for Interactive forms:
[SAP Help|http://help.sap.com/saphelp_nw04s/helpdata/en/60/f8123e9c6c498084f9f2bafab32671/frameset.htm]
Also there is one report to check/update the layout of the form check FP_CHK_REPORT'. Check the documentation before using this report.
[documnetation|http://help.sap.com/saphelp_nw04s/helpdata/en/44/e96677f1c367d6e10000000a155369/frameset.htm]
Hope this helps,
shrinivas -
PROGRAM FOR INTERACTIVE ALV REPORT
Hi frens,
this is my 3rd query to this forum. the response of this forum is excellent.now my question is :
whats the source code(or program) for Interactive ABAP List Viewer(ALV) reports connecting KNA1 as basic list and VBAK, VBAP as the seconday lists...having the relation between KNA1 and VBAK with KUNNR and VBAK and VBAP with VBELN as key fields.Hi Prasad
<u><b>For More alv report examples check these Tcodes <i>LIBS, BIBS</i> Here u can find more number of examples on alv reports of different kinds
check this sample code for intercative alv report</b></u>
TYPE-POOLS: SLIS.
*type declaration for values from ekko
TYPES: BEGIN OF I_EKKO,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKKO-AEDAT,
BUKRS LIKE EKKO-BUKRS,
BSART LIKE EKKO-BSART,
LIFNR LIKE EKKO-LIFNR,
END OF I_EKKO.
DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
WA_EKKO TYPE I_EKKO.
*type declaration for values from ekpo
TYPES: BEGIN OF I_EKPO,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
MENGE LIKE EKPO-MENGE,
MEINS LIKE EKPO-MEINS,
NETPR LIKE EKPO-NETPR,
END OF I_EKPO.
DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
WA_EKPO TYPE I_EKPO .
*variable for Report ID
DATA: V_REPID LIKE SY-REPID .
*declaration for fieldcatalog
DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
* declaration for events table where user comand or set PF status will
* be defined
DATA: V_EVENTS TYPE SLIS_T_EVENT,
WA_EVENT TYPE SLIS_ALV_EVENT.
* declartion for layout
DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
* declaration for variant(type of display we want)
DATA: I_VARIANT TYPE DISVARIANT,
I_VARIANT1 TYPE DISVARIANT,
I_SAVE(1) TYPE C.
*PARAMETERS : p_var TYPE disvariant-variant.
*Title displayed when the alv list is displayed
DATA: I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
DATA: I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
INITIALIZATION.
V_REPID = SY-REPID.
PERFORM BUILD_FIELDCATLOG.
PERFORM EVENT_CALL.
PERFORM POPULATE_EVENT.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_REPORT.
*& Form BUILD_FIELDCATLOG
* Fieldcatalog has all the field details from ekko
FORM BUILD_FIELDCATLOG.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'AEDAT'.
WA_FIELDCAT-SELTEXT_M = 'DATE.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'LIFNR'.
WA_FIELDCAT-NO_OUT = 'X'.
WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG
*& Form EVENT_CALL
* we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
* EXCEPTIONS
* LIST_TYPE_WRONG = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "EVENT_CALL
*& Form POPULATE_EVENT
* Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form data_retrieval
* retreiving values from the database table ekko
FORM DATA_RETRIEVAL.
SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
ENDFORM. "data_retrieval
*& Form bUild_listheader
* text
* -->I_LISTHEADEtext
FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA HLINE TYPE SLIS_LISTHEADER.
HLINE-INFO = 'this is my first alv pgm'.
HLINE-TYP = 'H'.
ENDFORM. "build_listheader
*& Form display_alv_report
* text
FORM DISPLAY_ALV_REPORT.
V_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
* I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = I_TITLE_EKKO
* I_GRID_SETTINGS =
* IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = I_FIELDCAT[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* i_default = 'ZLAY1'
I_SAVE = 'A'
* is_variant = i_variant
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKKO
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "display_alv_report
*& Form TOP_OF_PAGE
* text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
* i_logo =
* I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
* text
* -->R_UCOMM text
* -->, text
* -->RS_SLEFIELDtext
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
PERFORM BUILD_FIELDCATLOG_EKPO.
PERFORM EVENT_CALL_EKPO.
PERFORM POPULATE_EVENT_EKPO.
PERFORM DATA_RETRIEVAL_EKPO.
PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_EKPO.
ENDCASE.
ENDFORM. "user_command
*& Form BUILD_FIELDCATLOG_EKPO
* text
FORM BUILD_FIELDCATLOG_EKPO.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELP'.
WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MENGE'.
WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-SELTEXT_M = 'UOM'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'NETPR'.
WA_FIELDCAT-SELTEXT_M = 'PRICE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG_EKPO
*& Form event_call_ekpo
* we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL_EKPO.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
* EXCEPTIONS
* LIST_TYPE_WRONG = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "event_call_ekpo
*& Form POPULATE_EVENT
* Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT_EKPO.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form TOP_OF_PAGE
* text
FORM F_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
* i_logo =
* I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
* text
* -->R_UCOMM text
* -->, text
* -->RS_SLEFIELDtext
*retreiving values from the database table ekko
FORM DATA_RETRIEVAL_EKPO.
SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
ENDFORM.
FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA: HLINE1 TYPE SLIS_LISTHEADER.
HLINE1-TYP = 'H'.
HLINE1-INFO = 'CHECKING PGM'.
ENDFORM.
FORM DISPLAY_ALV_EKPO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = V_REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
I_GRID_TITLE = I_TITLE_EKPO
* I_GRID_SETTINGS =
* IS_LAYOUT =
IT_FIELDCAT = I_FIELDCAT[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT =
I_SAVE = 'A'
* IS_VARIANT =
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKPO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
Reward all helpfull answers
Regards
Pavan -
Does the Creative Cloud app on Mac have to launch at login to check for updates?
I don't really care to have the Creative Cloud app on my Mac running all the time. I don't use any of the features for it other than to update apps.
If I UNcheck "Launch at login"....will I still get notified of updates?
-KevinI certainly didn't have the Application Manager running all the time in CS6. Adobe must have had a background process checking for updates because in CS6 where there was an update, I would get the update icon in my menubar.
What I'm wondering now is.....does CC have a similar process that will notify me of updates? I don't want to have to manually launch the Creative Coud app just to check.
-Kevin -
When i connect my iphone 3GS to my PC, while syncing in progress, pc shows backing up, preparing to sync. Then message display "itunes stopped working",
windows checking for solution, Then message comes "A problem caused the program to stop working correct. Windows will close the program and notify you if solution is available" , Then Itunes go off. I have tried agains installing Itunes etc no use. I am not a computer literate, help me to resolve this, ThanksI have already copied my photographs to the a library manager but when I tried to reuse iphoto and import the photos back into iphoto, it would not let me.
You can't "copy" your photos to the "library manager", there is just no way to any such thing.
Option 1
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
If that fails:
Option 2
Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
Regards
TD -
Is there a program that will check for viruses or other reasons why it runs slow?
For several months my iMac has been running slow or freezing often. Safari often quits unexpectedly as does mail on occasion.
Programs that check for viruses are a major cause of slow Macs, so let's look at doing steps that don't handicap your computer:
1) How full is your hard drive? You need a minimum of 10G free for background processes such as Virtual Memory.
2) How much RAM is installed? RAM for the Mid-2010s is rather cheap at the moment, I upgraded my 27-inch Mid-2010 recently from the original 4GB to 12 GB for about US$55. Installation took only minutes.
3) If you have an external hard drive for backups, are you using something other than Time Machine to do the backups. Many third-party backup programs can cause a performance hit.
The next step is a little longer. It checks to see if some runaway background process is eating processor cycles and slowing you down:
1) Use your computer normally for typical tasks for several hours, then quit any applications you have launched. Do not restart.
2) In Applications > Utilities, find Activity Monitor. If you've not used it before, you have to change a setting. At the top of the AM window is a "Show" option. By default it is set to show "My Processes." Change it to "All Processes" like this:
4) Now highlight the "%CPU"column as shown so the most active processes "bubble"to the top (tiny arrow points down).
Now watch things move up and down for a minute of two. What you are looking for is any single process that is using more than about 10 percent of the processor cycles while the computer is idling. If you see one doing that, post its name in a reply here.
Awaiting your report,
Allan -
HR: Program name for Indian Payment Medium - Check
Hi
Can anybody tell me what is the name of the program to print check for India
regards,
AabhasCheck Printing program is same for all.
You need to create a variant and to be attached to the print program in F110 Print out /data medium (RFFOUS_C)
If it is customised program and layout needs to be assigned FBZP.
To create new report you can use SE71 or SMARTFORMS as per your requirements where you can copy standard form and make changes.
Check printing depends on the schema and the company code selected in the program.
You can refer this documen t on check management also -
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/FIBP/FI-BL-BM-CM.pdf
Regards,
Amit
reward all helpful replies.
Maybe you are looking for
-
I need to get this off my chest, as I see 2 similar posts regarding this same problem. If bestbuy.com proceeds to take in an order and cancel it, you should also be able to reissue a promotion code. Particularly because bestbuy.com customer service
-
Sending Reporting Services report via the command line
I would like to either execute a subscription that sends a report via email on demand. That or just email the report without having to edit the subscription date. Can this be done from the command line? I see there is the rs.exe utility that allow
-
CANNOT Remove Photos--Super Frustrated
I synced an album from my computer to my IPhone, which now I will NEVER do again, and it will NOT remove it. I've gone into ITunes and un-synced the album & YET, still there it is, on my phone. I am extremely annoyed with this. This should not be thi
-
Why won't Apple ship me my phone?
I pre ordered my iPhone on Jun 15th and received a confirmed order# with a delivery date of Jun 24th. You guessed it, I still don't have a phone and none has been shipped. When I call I can't talk with anyone with authority to give me a straight answ
-
How can I show my mail count that I have saved in my folder when entering my mail box?
I want to display my overall mail count when I open my mail. Even when I saved them.