Reg. PushButtons

Hi all,
  I create a pushbutton, Icon in selection-screen on application tool bar and disable the execute icon.
now my question is <b>when i click the pushbutton it execute and display the report list</b>.
and when i choose the icon an information is diplayed in a popup window.
plz. give me the solution with code.

Hi,
Use BADI "BADI_MAT_F_SPEC_SEL" to change the field properties of transaction MM01 and MM02.
Put your logic in Method "FIELD_SELECTION".
This method is called for each field and Structure FAUSWTAB contains field attributes of each field which you need to modify as per your requirement.
For greying out Pushbutton "Additionals" in Basic Data screen write below mentioned code in Method FIELD_SELECTION.
if fauswtab-fname = 'MARA_WTADDI'.
    fauswtab-kzinp = '0'.
endif.
Regards,
Vijay

Similar Messages

  • Pushbutton Problem in web dynpro

    hi there,
    i have a sap standard web dynpro. in the portal i have the UI elements tree to personalize the dynpro.
    there is a part where i have 2 push-buttons:
    Pushbutton 1
    Pushbotton 2
    by default Pushbutton 1 is activated. Now i want to hide Pushbutton 1 for the user. So far so good, i can do it in the UI elements tree and change it.
    The Pushbutton 1 now is hidden. BUT: i want to have Pushbutton 2 activated automaticly. Now the pusbutton is not 'ON'.
    how can i achive this with the UI elements tree control in Portal. I am NOT a JAVA-developer, i have no idea about web dynpro, i am coming from abap side. so i DON'T want to modify the web dynpro.....i need a way to do it with the personalization function in portal.
    reg, Martin

    Hi,
    I assume that your requirement is to show one button at a time button1 or button2.
    create 2 context attribute of type Visibility under uielementdefinition.
    bind one of the context to button1's visibility property and the other to the button2's visibility property.
    Now, in your code as per your condition, you can set the visibility as
    wdContext.currentContextElement().set<visible1>(WDVisibility.VISIBLE);//To Show
    wdContext.currentContextElement().set<visible1>(WDVisibility.NONE);//To Hide
    Regards,
    Murtuza

  • Pushbuttons  with Traffic lights

    hello,
               How is it possible to have trafficlights on pushbuttons....
    for eg., i ve got pushbuttons thru cl_gui_toolbar within a
    container...now i need to change the status of PBs ie.,it shud
    show messages thru lights based on the content in respective
    screen..plz throw some light on this light problem...
    Thanks & Regards,
    Swaminathan.

    hi eswar,
       plz check the code below :
    MODULE STATUS_0001 OUTPUT.
        perform get_dock.
      repid = sy-repid.
      dynnr = sy-dynnr.
      if docking is initial.
        CREATE OBJECT DOCKING
          EXPORTING
       PARENT                      =
            REPID                       = repid
            DYNNR                       = dynnr
            SIDE                        = DOCKING->DOCK_AT_LEFT
            EXTENSION                   = 160
    endif.
    endform.
        perform create_splitter.
    form create_splitter.
      if not docking is initial.
        CREATE OBJECT SPLITTER
          EXPORTING
            LINK_DYNNR        = dynnr
            LINK_REPID        = repid
           PARENT            = docking
            ROWS              = 2
            COLUMNS           = 1
    endif.
    endform.
        perform splitter_height.
    form splitter_height.
      if not splitter is initial.
        CALL METHOD SPLITTER->SET_ROW_HEIGHT
          EXPORTING
            ID                = 1
            HEIGHT            = 19
    endif.
    endform.
    perform set_buttons.
    form set_buttons.
      if it_data_table is initial.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-fUNCTION = 'KOPF'.
        wa_data_table-icon = '@5C@'.
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_BUTTON.
        wa_data_table-text = 'Header Data'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-function = 'D1'.
        wa_data_table-icon = '@5D@' .
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_dropdown.
        wa_data_table-text = 'D1'."Problem Solving Team'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-function = 'D2'.
        wa_data_table-icon = '@5B@'.
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_BUTTON.
        wa_data_table-text = 'D2'." Problem Description'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-function = 'D3'.
        wa_data_table-icon = '@5D@'.
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_button.
        wa_data_table-text = 'D3'." Int.Containment Action(s)'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-function = 'D4'.
        wa_data_table-icon = '@5C@'.
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_button.
        wa_data_table-text = 'D4'." Root Cause Analysis'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-function = 'D5'.
        wa_data_table-icon = '@5D@'.
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_button.
        wa_data_table-text = 'D5'." Poss.Permanent Corr.Action(s)'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-function = 'D6'.
        wa_data_table-icon = '@5B@'.
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_button.
        wa_data_table-text = 'D6'." Introduced Corr.Action(s)'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-function = 'D7'.
        wa_data_table-icon = '@5D@'.
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_BUTTON.
        wa_data_table-text = 'D7'." Preventive Action(s)'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
        clear wa_data_table.
        perform it_data_table_space.
        wa_data_table-function = 'D8'.
        wa_data_table-icon = '@5D@'.
        wa_data_table-disabled = ' '.
        wa_data_table-butn_type = CNTB_BTYPE_button.
        wa_data_table-text = 'D8'." Congradulate Your Team'.
        wa_data_table-quickinfo = ' '.
        wa_data_table-checked = ' '.
        append wa_data_table to it_data_table.
      endif.
    ENDFORM.                    " set_buttons
    FORM it_data_table_space.
      wa_data_table-fUNCTION = ''.
      wa_data_table-icon = ' '.
      wa_data_table-disabled = ' '.
      wa_data_table-butn_type = 3.
      wa_data_table-text = ''.
      wa_data_table-quickinfo = ''.
      wa_data_table-checked = ''.
      append wa_data_table to it_data_table.
      clear wa_data_table.
    ENDFORM.                    " it_data_table_space
    perform get_buttons.
    FORM get_buttons.
      if not container_bottom is initial.
        CREATE OBJECT GET_BUTTON
       EXPORTING
         PARENT             = container_bottom
       SHELLSTYLE         =
       LIFETIME           =
         DISPLAY_MODE       = get_button->M_MODE_vertical
       NAME               =
    EXCEPTIONS
       CNTL_INSTALL_ERROR = 1
       CNTL_ERROR         = 2
       CNTB_WRONG_VERSION = 3
       others             = 4
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      endif.
      if not get_button is initial.
        CALL METHOD GET_BUTTON->ADD_BUTTON_GROUP
          EXPORTING
            DATA_TABLE       = it_data_table.
      endif.
    ENDFORM.                    " get_buttons
    Also,
      i have built an events table and registered events in PBO.
    (if needed, i will send u the events reg. code too).
    Plz check it out and give me the solution.
    Thanks & Regards,
    Swami.

  • Greying out Pushbuttons in MM01

    Hi Folks,
    Please let me know how can I grey out the pushbuttons in standard SAP  transactions.like I wan to grey out the ADDITIONALS (pushbutton ) of Basic data view 2 in MM01.
    when i checked SDN lot of posts reg greying out fields but not for pushbuttons.
    Please throw some light on this.
    Thanks,
    Shwetha

    Hi,
    Use BADI "BADI_MAT_F_SPEC_SEL" to change the field properties of transaction MM01 and MM02.
    Put your logic in Method "FIELD_SELECTION".
    This method is called for each field and Structure FAUSWTAB contains field attributes of each field which you need to modify as per your requirement.
    For greying out Pushbutton "Additionals" in Basic Data screen write below mentioned code in Method FIELD_SELECTION.
    if fauswtab-fname = 'MARA_WTADDI'.
        fauswtab-kzinp = '0'.
    endif.
    Regards,
    Vijay

  • Mail can't send email from 123-reg accounts

    Hi all,
    I've got an issue with Mac Mail can’t send email from 123-reg accounts.
    I know there is a lot of articles on simular matters and some I have tried out with no luck, others are just speaking a whole other language.
    Any help would be greatly recived, here's my situation below:
    Running a iMac 2.8GHz Intel Core i5 on OS X 10.8.3
    I’m using 3 accounts on Macs Mail client, one is my iCloud account that is working fine and the other two are my 123-reg accounts that I use for business purposes. I’ve been working like this for a couple of years now and about 6 months ago I upgrade my operating system from Snow Leopard to Mountain Lion.
    2 or 3 months ago I randomly got a problem where I was unable to send any emails from my 123-reg account, I could only receive emails. I checked my settings and they were all correct and unchanged so I attempted to delete them and recreate the account but with no such luck.
    I then decided to check if it was a problem at 123-regs end and attempted to log into web mail. This worked and was able to both send and receive emails so eliminated that possibility.
    I also have these accounts set up on my iPhone, so checked if there was any issues and everything was working fine. I then checked my iphone details and made sure the same was on my desktop and still no such luck.
    I’ve tried out some of the articles I’ve found on here (the ones written in plain English) still no results. I’m not very IT illiterate and just wondered if anyone else has got any ideas, whether there is something specific with 123-reg accounts and Mac Mail?
    Many thanks.

    Thanks
    I just had another hunt around looking at posts and discovered that it was because I recently changed to BT Infinity and they had a block on.
    I didn't even think to question the ISP.
    https://discussions.apple.com/message/21173608#21173608

  • Md04 - additional columns as pushbutton

    Implementing the badi MD_ADD_COL_EZPS
    How can I add a column and the content of the column is a pushbutton ????
    thanks in advance
    Stephan

    Hi Stephen,
                        I just made this particular enhancement. You first have to check if the BADI - MD_ADD_COL_EZPS - is activated. If it is then you will have to do the enhancement using the BADI, else you can use the combination of the two following User-exits :
    EXIT_SAPLM61R_001, EXIT_SAPMM61R_001.
    Thanks & Regards,
                         Aditya

  • Down Payment Clearing pushbutton in MIRO (SAP ECC6 EP4) after F-48

    Hi,
    I have tried all sorts of steps, but I am unable to see this Down Payment Clearing pushbutton in MIRO transaction.
    Required package - LOG_MMFI_P2P is already installed and found OK in SFW5.
    Down payment maintained in PO, request created in F-48 and now I am trying to clear it in MIRO, but this button is not visible.
    Any clue?
    Please revert.
    Regards,
    Dipak

    Dear Experts,
    As i am trying to do the same process in my organisation to post the DP in PO at header or item level and after that following the ME2DP process for posting DP and then i do MIGO.
    After GR as i do MIRO process and select the PO there is no DOWN PAYMENT Push button on header level on MIRO Screen.
    I already re-started the Business Function "LOG_MMFI_P2P" after that also it is not showing the push button.
    Please kindly help in this to get that DOWN PAYMENT clearing button?
    Regards
    Arun Rai

  • Custom pushbutton in ME21N should display a popup window with item details

    Hello,,
    The requirement is to
    1. Add a custom pushbutton in ME21N screen at header level.
    2. The user will select some PO line items and will click on this push button.
        This inturn should trigger a popup window with item details only for those selected PO line items along with schedule line qty.
    I have created the custom push button in a custom tab using the BADI ME_GUI_PO_CUST.
    Now I am not able to retrieve item details and schedule line details inside the PAI of the custom tab..
    i.e., when i click on the custom push button, I am not able to retrive the item data and schedule line data.
    Please help me to retrive PO line item data and schedule line data.
    Regards,
    Sharah

    JSF is not so relevant in this question. It's all about how the generated client side code look like. Which is usually a bunch of HTML/CSS/JS (open page in browser, rightclick and view source). If you know HTML, you should know that using target="_blank" in a <form> or <a> element would open a new window. If you know JS, you should know that using window.open() would open a new window.
    Apply this so in the JSF source code so that the generated HTML/JS output is exactly what you want.

  • Reg: Message and BPM

    Hi
    I'm having a scenario where i use a JDBC adapter to extract data from a DB. As a result of the query say, 10 rows are returned as message to XI server. I have a transformation (BPM) set and the receiver(target system) is a file. When i open the file to see its contents i can see only the first record been transfered. The mapping part used for the transformation node is having IF condition. But all the fetched records satisfies the conditions in the mapping.
    Pls let me know the corrective step.
    reg: Prabhu

    Hi,
    1)Check the input XML i.e all 10 records are coming into XI . This you can check in SXMB_MONI
    2) Then you can test the mapping in the integration Reposiotry .. So now you can get if any mapping problem. For this , check is the occurence of target strcuture is 1..n or 0.n
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    3) If mapping is correct , then check the RWB->Message Monitoring->Message Display Tool and check the payload.
    4) If this is correct, then check the File COntent Conversion of the Receiver File Adapter.
    Hope this helps,
    Regards,
    Moorthy

  • Regarding pushbutton operation in alv report

    hi,
    I have a requiement in which i will get list display which contains certain no of records(let us say 10  records)...now the issue is *if i selet one record and if it is correct record* and if i hit the insert pushbutton it should go and insert into z-table which i hav created.....and if the record which i hav selected is error record.....it should throw an error message saying that it is the error record....as error record stops further process i hav used it as information message and i used 'display like 'E''....so that it wont affect further proceedings.....
    and if i select the 2nd record and if i hit the pushbutton it is taking to the sap initial screen which i dont want .....
    how to solve this issue?
    can anyone plz help me in this issue....

    Hi Needy ,
      M giving you a sample code where you can set your pf-status and how to handle the check box etc .
    This code shows you hoe to select and deselect the check boxes ..
    All that you have to do is apply your logic...
    set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .                          " DO W_LINES TIMES
          clear w_line .
        when 'DESELECT' .
          set pf-status 'SELECT' excluding 'DESELECT' immediately.
          do w_lines times .
            read line w_line field value w_check .
            if w_check = 'X' .
              w_check = space .
              modify line w_line field value w_check .
              add 1 to w_line .
            endif .                        " IF W_CHECK = 'X' .
          enddo .                          " DO W_LINES TIMES
          clear w_line .
         Here w_line : Line that is being read
                 w_lines : Total number of lines in your table(or list if you use 'list number of lines w_lines)
                w_check is my checkbox .
    Hope your need will be done!!
    Much Regards ,
    Amuktha .

  • Display a cell in ALV report as Pushbutton

    Hi,
    I am having an ALV report. I want to display one cell of the ALV report as a Pushbutton. How is it possible ?
    Thanks and regards.

    Hi WTM,
      To display a cell as pushbutton in container display of a simple, two-dimensional table, use the cell type BUTTON.
    cell type -->
    In the content of your ALV output, you are able to display various elements in place of text. Some of these elements can be treated as a click area for the user. You are able to display the following elements:
    ·        Checkbox
    In list-type ALV ouputs, the checkbox is disabled. With the content of the column, you are only to display whether the checkbox is set or not.
    In the tree structure, however, you are able to handle users actions on this element using an event.
    ·        Pushbutton
    You are able to handle user actions on this element with an event.
    ·        Hyperlink
    You specify the Internet addresses (URLs). Users can then call up the corresponding page in the Internet browser by clicking on one of these Internet addresses.
    ·        Click Area
    You are able to handle user actions on this element with an event.
    Hope this helps u,
    Regards,
    Nagarajan.

  • Tooltip on pushbutton on alv report selection screen

    Hi Experts,
    I have a selection screen with two pushbuttons i want to provide tooltip on this button when user takes his cursor on it .. some part of my code
    Selection screen:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) text-t02 FOR FIELD p_info.
    PARAMETERS: p_info TYPE string.
    SELECTION-SCREEN: PUSHBUTTON 68(10) but1 USER-COMMAND cli1.
    SELECTION-SCREEN : END OF LINE.
    PARAMETERS:      r_exe_im  RADIOBUTTON GROUP rb1.
    PARAMETERS:      r_st  RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN: PUSHBUTTON /1(20) exec1 USER-COMMAND cli2.
    SELECTION-SCREEN: FUNCTION KEY 1.
    SELECTION-SCREEN END OF BLOCK b1.
    please tell me on these selection fields how to display tool tip.
    Thanks and regards,
    Roshan.

    Hi,
    After completing your executable program in SE38, activate it and goto SE51(Screen painter).
    Here give the name of your program and screen number as 1000.
    Click on Change.
    Goto Element List Tab.
    Here you will find all your elements from your program.
    Select the required element and click on Properties.
    Here you will find a Tooltip Text property. Click on the button 'Text' of this property.
    You will be given 2 options 1) Text from Text element 2) Text from Variable
    Enter as per requirement
    Save and Activate.
    Hope this will be useful
    Regards
    Bhupal

  • Reg: How to Stop Polling of JDBC Adapter without Scheduling the adapter

    Dear Gurus,
    Here I am having one requirement. My clients wants to send data from JDBC adapter (ORcale System table) to R3 system via RFC.
    His Requirement::
    1. He is not telling the time of data flow from Oracle server so that based on that we can schedule the adapter in the Communication Channel monitoring (Availablitiy Time Planning) or Else we can Schedule by deciding the setting of the polling interval time.
    2. He is telling that When ever he waants to send the data he will place one dummy file in the File Adapter FTP location so that it will became an Indication for u to poll the jdbc adapter and to transfer the data to R3.
    3. Untill he keeps the file or gives indication he doesn;t want to communicate with Oracle server due to some security and it s a most important data base he doesn't want to disturb that Oracle Server as so many business are running  on that.....
    We Proposed::
    1. Atleast you need to tell the scheduling time or poll interval time so that we can schedule our adapter.
    but he s not accepting for this
    2. Atleast U need to give access for Data base to enter one more extra field like STATUS CODE so that we will add one number and we keep on Update in the Update table and based on that Update table statement it will poll.
    but he s not even accepting for this
    3. Finally we prposed that to create another table in the Oracle SYstem as Dulplicate Table which is similar to Standard Orginal table when ever he wants to pick the data please keep that data in this Duplicate TABle so that JDBC adapter will pick the data from thsi TABLE instead of picking the data from that standard table so that it will not effect any standard table data in the table.
    but he s not even accepting for this
    We have done some R & D:::
    1. WE approached even through BPM and via switch conditions is one scenario
       FILE RECEIVE >SWITCH CONDITION> RECEIVE AND SEND or else EXIT
    2. Using correlation in anotehr scenario means correlating File adapter and JDBC and based on one dynamica value it will goes to SEND STEP ( RECE IVE --> RECEIVE --> SEND STEPS )
    Even though we know this...concept that...we jsut tried::
    In BPM we can control the flow in XI 3.0 but we cannot Stop the Polling of JDBC adapter at backend because one the data comes from FILE adapter it will keep on HOLD untill it receives the JDBC from Oracle then based on the condition or Correlation it will goes futher SEND step means after that file adapter is picking file or not ...what ever it may be JDBC will polls at backend and brings that data to BPM"
    Hence sugest me How to Stop Polling of JDBC Adapter without Scheduling the adapter or else using STATUS CODE Update statements in JDBC Tables 
    Regards:
    Amar Srinivas Eli

    Hi! All,
    Finally I decided to do the scenario in two steps:
    1: FILE REQ --> JDBC REQ -->JDBC RES --> FILE RECV
    2: FILE RECV --> RFC
    But I am getting issue while doing first scenario
    Desgn :
    I have created 2 Synchronous interfaces :
    1) FILE 2 JDBC REQ
    In this a) out put message is FILE  Req
              b) Input msage:; FILE RES
    2} JDBC2FILE RECV
            a) Output mesage;; JDBC REQ
            b) Input Msge :: JDBC Response
    Mappings:
    1) File REQ-->JDBC REQ
    2) JDBC RES-->FILE RES
    Interface mappings:
    1: FILE 2 JDBC REQ--> JDBC 2 FLE RECV
    CONFIGURATION ::
    1: One Seder File CC
    2: Two reciever CC's one is for JDBC RECEIVER and other s FILE RECEIVER
    3; One Sender Agreement
    4: 2 Recver agreements
    5: One Interface Determination and
    6: One RECCV Determination
    My Question;;
    1. First let confirm whether my development steps are right or not ?
    2: Another thing s I am not sure reg Configuration Steps means
    whetehr one interface determination and one Receiver Determinations are required or not as these are synchronous Interfaces
    3: main Issue is::::
    If my scenario s FILE2RFC2FILE then I will get RFC response automatically but here issue is this is JDBC
    My reqquirement is By sending one Field from fILE to JDBC REQ it needs to send entire TAbLE records as a Response to file as XML
    without having Sender JDBC how can I send the JDBC Res to FILE and If that is the case then again JDBC adapter is polling which is contradict to the client requuirement which i explained above.
    pleas suggest me the Detailed steps mainly Colloboration agreements and logical routings and
    also explain in detail if i can  go for BPM
    Also give cleear blogs but before giving make sure that it contains detailed screen shots because aIready gone thorugh
    Scenario File-JDBC-RFC
    File<-->JDBC Sync coomunication.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/file-rfc-file(Without+BPM)
    /people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough
    Regards::
    Amar Srinivas Eli

  • Excise Reg at Depot

    Hi all,
    We have Excise REg no for Plant. But plant does not have Excise reg no.
    Material is shipped to Depot with excise invoice. What is the procedure at depot for GR.
    Do i need to capture the excise invoice?. From Depot, there is no excise invoice generated for customers.
    thanks.

    Hi,
    Refer following link;
    [J95 - Sales at Depot|http://help.sap.com/bp_bblibrary/500/HTML/J95_SaleDepot_EN_IN.htm]

  • How to set reg.cgi for VideoPhoneLabs

    i start with stratus .i try set it to work with my dedicated apache server and sql but have no clue how to do it or where to put this file on my server.
    i realy have probleme with reg.cgi
    for now i did www/cgi-bin/reg.cgi and in the xml i set my websiteurl = "http://88..../cgi-bin/"
    also how to complete reg.cgi for have it to talk with my db ?
    here the reg.cgi file.
    help please ...
    #! /usr/bin/python --
    reg.cgi by Michael Thornburgh.
    This file is in the public domain.
    IMPORTANT: This script is for illustrative purposes only. It does
    not have user authentication or other access control measures that
    a real production service would have.
    This script should be placed in the cgi-bin location according to
    your web server installation. The database is an SQLite3 database.
    Edit the location of the database in variable "dbFile".
    Create it with the following schema:
    .schema
    CREATE TABLE registrations (
        m_username VARCHAR COLLATE NOCASE,
        m_identity VARCHAR,
        m_updatetime DATETIME,
        PRIMARY KEY (m_username)
    CREATE INDEX registrations_updatetime ON registrations (m_updatetime ASC);
    # CHANGE THIS
    dbFile = '.../registrations.db'
    import cgi
    import sqlite3
    import xml.sax.saxutils
    query = cgi.parse()
    db = sqlite3.connect(dbFile)
    user = query.get('username', [None])[0]
    identity = query.get('identity', [None])[0]
    friends = query.get('friends', [])
    print 'Content-type: text/plain\n\n<?xml version="1.0" encoding="utf-8"?>\n<result>'
    if user:
        try:
            c = db.cursor()
            c.execute("insert or replace into registrations values (?, ?, datetime('now'))", (user, identity))
            print '\t<update>true</update>'
        except:
            print '\t<update>false</update>'
    for f in friends:
        print "\t<friend>\n\t\t<user>%s</user>" % (xml.sax.saxutils.escape(f), )
        c = db.cursor()
        c.execute("select m_username, m_identity from registrations where m_username = ? and m_updatetime > datetime('now', '-1 hour')", (f, ))
        for result in c.fetchall():
            eachIdent = result[1]
            if not eachIdent:
                eachIdent = ""
            print "\t\t<identity>%s</identity>" % (xml.sax.saxutils.escape(eachIdent), )
            if f != result[0]:
                print "\t\t<registered>%s</registered>" % (xml.sax.saxutils.escape(result[0]), )
        print "\t</friend>"
    db.commit()
    print "</result>"

    Persistent binding is effectively provided by STMS (MPxIO) - is there anything in particular you're wanting to do that STMS doesn't provide?

Maybe you are looking for