RFC / FM to upload images to Production system

Hi Everyone,
I want to change my logo on my SAP Easy access..but I don't want to open my production system.
Is there any RFC / FM to upload the logo ?
Thank you!

Hi sarada,
you should be able to import logo in SMW0 directly in production system and transport entry in SM30, table SSM_CUST.
regards,
Edgar

Similar Messages

  • Minimum Trusted RFC's for productive system

    Hi!
    We have very strict requirements dealing with set up of Trusted RFC for productive system for ChaRM approach in SOLMAN.
    Can some one tell me which Trusted RFC's and users for the productive system do I need?
    a) Trusted RFC is not mandatory for the productive system
    b) Trusted RFC only in productive system, client: 000, users: 1 communication user and 1Dialog user
    c) Trusted RFC in productive system for  each client with users...
    Thank you very much!
    H. Thomasson

    Create the function modules in SE37 and set the remote-enabled flag in the attributes section. Then import them into XI.
    Create a custom Z table through SE11 on each system to store any data, and the code in each function module would reference it. (Either that or just hard-code everything)
    In short yes it can be done through SE37, no you don't need SE38.
    I think you're talking about function groups which is a container for the function module. You can do everything through SE37 if you use the Goto->Function Groups-> Create Group option and give it the same name as your Function Module.

  • Protect Production Systems from Local SLD installations

    If we have several developers in our organization with Local Development Workstations (meaning they installed a local copy of WAS 6.40, MaxDb, Portal) how do we prevent those developers from setting up there local SLD to connect to Production Systems.  If they set up a production system in the local SLD they will be able to configure their "adaptive rfc webdynpros" to connect to the production system with the jco connections in the Webdynpro Content Administrator.  Is the only control point their id they would enter when configuring the jco connection?

    YOu need the authorization for login in SLD as admin
    Follow this link for compete details:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e76e511-0d01-0010-5c9d-9f768d644808
    Are there any impacts/differences between exporting/importing and creating the systems manually? For example if I cannot export the systems would it be ok if I created them again in the production SLD?
    No differeence...it's just increase the work you have to do in SLD...but the important thing here is when you move the tranports of the SLD BS from DEV to Production you have to maintin the same name as you have maintained in the trnsport targets in the DEV......your ID tranport to Production is dependedn on what is the BS name you are mentinog of production in the transports targets.

  • Image: display from local drive, upload to server file system, and display from server

    Hello,
    I am using jdev 11.1.2.4.0...
    The requirement is that users would like to upload images from their local drive to server drive and they would like display images from server drive later.
    We don't want to keep images in database. I am not sure what the solution should be; however, I plan to ....
    1. create a table to keep an information of images -- image_id, image_location (server drive), image_filename
    2. create a page where users can enter image information and specific filename from a local drive (I think I will use inputFile component) and provide the preview button to display an image on screen before save it. To save data is to save information to the database and copy an image file to the server drive (the destination location for image files is predefined.)
    3. create another page where users can browse information from the database and display an image for a selected record by getting from the server.
    I need suggestions on...
    1. how to display an image on page from the local drive?
    2. how to copy a file from a local drive to a server?
    3. how to display an image on page from the server drive?
    Thank you.
    nat

    See:
    http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-1/
    http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/
    http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
    Where Timo saves images to the database, you save it to the file system (examples on how to do this from Java are available plenty if you just Google for it). Similar to Timo you then use the image tag to display images. The difference is that you can directly add the URL from the database table.
    The benefit of using a database to host images is that you are not dependent on file server structures though
    Frank

  • LSMW UPLOAD IT 0655 in Production System

    Hi,
    Firiends while uploading data in IT 0655 in Production System, for few personnel numbers I am getting this error
    *Missing secondary record for infotype 0002 for particular date for particular PERNR
    But i can see in the system that this record is existing.

    If you check the MP065500 screen 2000 there is a validation for infotype 2 while creating the 0655 record.
      if psyst-first eq yes and cprel-endda lt high_date.
    *   I105(RP): Gültigkeitsende muß gleich & sein
        p0002-endda = high_date.                               "VLDN212840_2
        cprel-endda = high_date.                               "VLDN212840_2
        message e105(rp) with high_date.
      endif.
      if psyst-ioper eq modify.
        if cprel-endda lt high_date and pskey-endda eq high_date.
          p0002-endda = high_date.                             "VLDN212840_2
          cprel-endda = high_date.                             "VLDN212840_2
          message e105(rp) with high_date.
        endif.
      endif.
    From what i understand the end date of your 0655 record will have the be equal to infotype 2. Not sure why this is done this way but still it's "hard-coded" so it isn't a customization thing.

  • RFC users locked after system copy in production system

    Hi,
    BW_User,MDBTC(RFC users) system users were locked in our BI Production system at the same time system copy activity was running in the Quality system(production to quality) so as per our colleagues concern after system copy they started Quality system with out changing background work-process 0 so some jobs were triggered which were copied from production system.
    Is there any cause to lock RFC users in production system for system copy? If there is any other reason where we can check logs
    Thanks
    Jalandhar Reddy

    Hi,
    Well maybe i am wrong to analyze your problem .
    Anyway I faced this issue to in our system before and we found that one background job was running  in a system that has basically  prompting an RFC connection to another system. In the t.code SM59 and there was wrong password was put in.We just reset the password and it was worked fine.
    You can try for this..
    Regards
    Bhuban
    RKFL

  • Data Uploading in Production system

    In Production system
    In OX09, for a Plant/Sloc combination, In the Addresses of storage locations ,we need to update some text(For example- test) in the SORT1 field (Search Term 1/2 Field) ,
    This we need to update for about 50-60 Sloc's in Production system,Kindly suggest what is the best way to achieve this without affecting other customization settings
    The SORT1 Field is in ADRC Table, We need to link this by passing the Plant in TWLAD table,get the Sloc and Address number field  and Pass the address number field in ADRC Table and check the SORT1 field.
    Regards
    Amuthan M
    Edited by: Amuthan M on Nov 18, 2008 10:45 AM

    Since its a customization data updation , normally for transactional data or any material master extension we use LSMW, in this case is LSMW is the best way to do that through Flat file
    Any more inputs Please,We need to finalise the approach ASAP
    Regards
    Amuthan M

  • Uploading mitigating controls - UAT to production system

    Dear gurus
    Before i place the issue i would like to give some background: In the Production system of Complaince calibrator we have 3 systems assigned Production, UAT and Develeopment. We are the implementation team and are not authorised to assign the mitigating controls for users in production system , therefore before going live we have assigned the mitigating controls to same set of users in UAT system in the production system of compliance calibrator. Now the region has gone live and the same set of mitigating controls needs to be assigned to same set of users with same risks to production system users.
    Issue: Now there are over 100 users and its not feasible for us to manually once again assign the same mitigating controls to the users. is there a posiibility to automate this assignment or will we have to do it manually. In case we can automate then how? in case we have to manually do it what is the best way to cover the users faster.
    Thanks in advance
    Vani

    Thanks Frank, Would you advise which would be the better editor?
    Hi Alpesh,
    If i understand correct, you mean to say that its the same table, since its the same RAR production system, but currently while adding the mitigations I would have chosen the users as mentioned in UAT system that is attached to RAR production, but how do I make it as production system? If i go by what you say, I should add the user ids as per the production backend system in the same tabel and then it will automatically pick it while running reports for production users, is that correct?

  • Create a Support Message in Production system showing up in Solution Manage

    Has anyone setup the link between creating a support message (under help) in a production system (like ECC) and SAP's Solution Manager.
    I understand that it uses BADI SBCOS001 with the interface method PREPARE_FEEDBACK_BO, but when I try to run it, it tells me that Customizing for feedback functionality missing. What functionality is missing? And how to I correct this? And how do I ensure it shows in SAP Solution Manager under a solution or project?
    Thanks
    Paul

    Hi Paul
    The only way is to use the IMG. I have just completed this via the IMG info. BUT, it is not that simple.
    Make sure your RFC's are trusted and that you have SAP ALL during config.
    I hope this will help:
    Setup Service Desk
    Steps to follow while configuring support desk.
    1) Implement the note 903587 .
    2) Create all the relevant RFC objects in the satellite system and add the appropriate logical components using transaction SMSY.
    3) Check all the objects in the table BCOS_CUST using transaction SM30.
    Appl : OSS_MSG
    + :W
    DEST :BACK RFC NAME (for solution manager system keep this field as 'NONE')
    + :CUST 620
    + :1.0.
    *4) Check whether the BC sets are activated or not using the transaction SCPR20.If the BC sets are not activated then implement the note 898614.The steps to activate the BC sets are described below
    4.1) Activate SOLMAN40_SDESK_BASICFUNC_000 BC Set.
    4.2) Activate this in expert mode with option u201COverwrite everythingu201D.
    4.3) Activation of the following components has to be done by replicating the previous steps
    3.1) SOLMAN40_SDESK_TPI_ACT_AST_001
    3.2) SOLMAN40_SDESK_ACTIONLOG_001
    3.3) SOLMAN40_SDESK_ACT_ADVCLOSE_001
    3.4) SOLMAN40_SDESK_TEXTTYPES_001
    *Depends upon the number of inactive BC set objects that we have after the upgrade.
    4.4) if the actions mentioned in 4.3 are not listed while executing the transaction SCPR20, then implement the note 898614.In the source client 000 of the solution manager system create a transport request using transaction SE09, unpack the file 'PIECELIST_SERVICE_DESK_INIT.ZIP' from the attachment of the note. Copy the contents of the file 'PIECELIST_SERVICE_DESK_INITIAL.TXT' to the transport request. And activate the actions. Use transaction SCC1 to import the transport request to the solution manager client. If any short dump occurs during the activation, implement the note 939116.
    5) Check whether the number range is set correctly. If not set the number ranges of basic notification (ABA) and the support desk message (Service transaction SLFN).To be able to use the same number ranges for both message types, the internal number range for basic notification (ABA) must correspond to the external number range for the support desk message.
    Number ranges for ABA notifications
    5.1) create an internal and external number range using transaction DNO_NOTIF.
    5.2) assign number range intervals to groups internal and external.
    5.3) SLF1 is the internal number range group
    5.4) SLF2 and SLF3 is the external number range interval
    5.5) Use transaction DNO_CUST01 to assign message categories to the number range.
    5.51) Go to transaction DNO_CUST01
    5.52) From the GOTO menu select the menu item DETAILS
    5.53) Now you can assign the number range of basis notification (ABA) into the notification type.
    The number range for ABA notification is 12 characters in length and to make it compatible with the CRM service transaction insert 2 ZEROES at the beginning.
    Number ranges for Support Desk notification
    5.54) Use transaction CRMC_NR_RA_SERVICE, and define the internal and external number ranges. Intervals must correspond to the intervals of the basic notifications (ABA notification).
    5.6) Then assign both the external and internal numbering
    5.61) Go to SPRO and then to SAP Solution Manager
    5.62) Then select General Settings and then select Transaction types
    5.63) Select the transaction type SLFN and then select the menu item DETAILS from the GOTO menu.
    5.64) In the Transaction Numbering block, assign the internal and external number range. The Number Range object should be CRM_SERVIC.
    5.7) To view the priorities use transaction DNO_CUST01 and select the notification type as SLF1 and then select priorities from the left pane of the screen. The priorities of the first four cannot be deleted, but new priorities can be added.
    6) Check the Action profiles for ABA Notifications (Action profiles are used for synchronization of ABA notification with the CRM Service transaction).
    6.1) To check the action profiles use the transaction SPPFCADM and select the application type DNO_NOTIF then select u2018DEFINE ACTION PROFILE AND ACTIONSu2019.
    6.2) Select the item u2018SLFN0001_STANDARD_DNOu2019 and then from the menu GOTO, select the menu item DETAILS.
    7) The Action profile u2018SLFN0001_STANDARD_DNOu2019 has to be assigned to the message category SLF1 (ABA notifications) using the transaction DNO_CUST01.
    8) The action profile for the support desk message can be set to u2018SLFN0001_ADVANCEDu2019.
    8.1) From SPRO select SAP Solution Manager then Scenario Specific Settings.
    8.2) Select the item Service Desk and then to general settings.
    8.3) Execute the category u2018Define Transaction Typesu2019.
    8.4) Select the transaction type as SLFN
    8.5) From the GOTO menu select the menu item u2018DETAILSu2019 and assign the action profile as SLFN0001_ADVANCED .
    9) Activate the partner/ Organization
    9.1) Go to CRM->MASTER DATA->BUSINESS PARTNER->INTEGRATION BUSINESS PARTNER ORGANIZATION MANAGEMENT->SET UP INTEGRATION WITH ORGANIZATIONAL MANAGEMENT.
    9.2)Find the entries starting with HRALX
    HRALX-HRAC WITH VALUE 'X'.
    HRALX-OBPON WITH VALUE 'ON'.
    HRALX-PBPON u2018ONu2019.
    HRALX-MSGRE u2013 u20180u2019.
    9.3) If entries are not found create it.
    10) Generate Business partner screens
    10.1) Go to transaction BUSP.
    10.2) Execute the report with the following parameters
    CLIENT - Client in which business partners should be created (solution manager client)
    APPLICATION OBJECT-
    SCREEN - *
    Generate all/ selected screens - All screens.
    delete sub screen containers -
    11) implement SAP note 450640.
    11.1) Go to transaction SA38 and select the report CRM_MKTBP_ZCACL_UPDATE_30.
    11.2) Execute it with test mode box unchecked.
    If a new relationship is to be created then steps 12 and 13 has to be followed
    12) To create a relationship category
    12.1) Go to transaction BUBA
    12.2) Select the entry CRMH00: Undefined relationship
    12.3) click on copy
    12.4) Rename CRMH00 to ZCRMH00.
    12.5) CREATE A RELATIONSHIP CATEGORY.
    IN GENERAL DATA FILL LIKE ' FROM BP1 : HAS THE ACTIVITY GROUP '.
    ' FROM BP2 : IS A PART OF ATTUNE
    13) Add the relationship category to the support team partner function
    13.1)Use SPRO
    IMG GUIDE->SAP SOLUTION MANAGER->SCENARIO SPECIFIC SETTINGS->
    -> SERVICE DESK->PARTNER DETERMINATION PROCEDURE->DEFINE PARTNER FUNCTION.
    13.2) FIND THE PARTNER FUNCTION SLFN0003 (SUPPORT TEAM).
    13.3) In the field relation ship category, Select the newly created relationship category and save.
    14) Steps 12 and 13 should be repeated for various business partner types like sold-to-party, message processors if new relationship is to be created for the respective business partner types.
    15) Create a new access sequence for the support team determination
    15.1) Go to the following IMG Path: SAP Solution Manager Implementation Guide ->
    SAP Solution Manager -> Configuration ->
    -> Scenario Specific Settings ->Service Desk -> Partner Determination Procedure ->
    ->Define Access Sequence
    15.2) Click on New Entries
    15.3) Define a new access sequence with sequence name as u2018Z001u2019 and description u2018NEW BP RELATIONSHIP ACTIVITY GROUPu2019
    15.4) Create an new Individual Access with the following value:
    u2022 Batch Seq: 10
    u2022 Dialog Seq : 10
    u2022 Source : Business Partner Relationship.
    u2022 Detail on the source:
    u2022 Partner Function : Reported By (CRM)
    u2022 Mapping/restrictions
    u2022 Flag Mapping/definition for partner being Searched
    u2022 Partner Function in Source: Support Team (CRM).
    Save it.
    This Access Sequence will give us the Partner which has the relationship assigned
    to the Support Team in the Reported By partner data.
    16) Adapt the partner determination schema/Function
    16.1) Go to the following IMG Path: SAP Solution Manager Implementation Guide ->
    SAP Solution Manager -> Scenario Specific Settings ->Service Desk ->
    -> Partner Determination Procedure -> Define Partner Determination Procedure.
    16.2) The two options to adapt partner determination schema are
    16.21) Adapt the standard Procedure (SLFN0001) or to create a new one by copying the standard one.
    16.22) select the line starting with SLFN0001 or the newly created procedure.
    16.23) Double Click on Partner Function in Procedure.
    16.24) Select the Partner Function "Support Team", and click Details.
    16.25) in the detail view only change the Partner Determination/access Sequence to
    the one we've just created. Save your entry.
    17) Create a root organizational model.
    17.1) Go to the following IMG Path: SAP Solution Manager Implementation Guide -> SAP Solution Manager -> Configuration-> Scenario Specific Settings ->Service Desk -> Organizational Model ->Create a Root Unit for Your Organizational Structure.
    17.2) creating an organizational unit by entering the data in the BASIC DATA tab.
    17.3) enter the organizational unit, the description and save it.
    18) Create the support team organization
    18.1) go to the following IMG Path: SAP Solution Manager Implementation Guide -> SAP Solution Manager -> Scenario Specific Settings ->Service Desk -> Create Organizational Objects in the Organizational Structure. Or use transaction (PPOMA_CRM).
    19) Create the business Partners.
    19. 1) Key users- End user (Business Partner General) ,Address should be specified.
    19.2) go to the transaction BP.
    19.3) create a new Person, Select the role: Business Partner (Gen).
    For Identification of the key user
    19.31) click on the identification tab
    19.32) enter a line in the identification number formatted as follows
    IDTYPE : CRM001.
    Identification number : <SID><INSTALL NUMBERS><CLIENT><USERNAME>
    eg: USER NAME : USER1.
    CLIENT : 100.
    SID : ER1.
    INSTALL NUMBER : 123456789.
    IDENTIFICATION NUMBER : ER1 123456789 100 USER1.
    20) Message Processors- Support Team members .
    20.1) they should be created first as the users in the corresponding client of the solution manager.
    20.2) As business partners they will have the role 'EMPLOYEE'.
    20.3) Go to transaction BP .
    20.4) Create New Person with the role employee.
    20.5) In the Identification tab you should enter the user name in the employee data/User Name.
    eg: username: proc1
    enter proc1 in the field User name.
    21) Organizational Business Partner- Organizational BPS have the same country in there main address tab. They should be created through the organizational model. Business partner corresponding to the root organization have the role 'SOLD TO PARTY'.
    22) Assign the business partners (Message Processors) to the previously created support team.
    22.1) Go to transaction PPOMA_CRM.
    22.2) Select the support team 1.
    22.3) Click on create
    22.4) select position
    22.5) call it 'MPROC_T1/Message Processors for team 1
    22.6) Replicate it for the other support teams.
    22.7) Select the position MPROC_T1/Message Processors for team1 and click assign,
    choose owner/Business Partner find and select the business partner
    22.8) Validate and Save it.
    22.9) If the assignment of business partner is not possible then implement the note 1008656
    Or 997009
    23) Create the iBase component
    23.1) IMG Path: SAP Solution Manager Implementation Guide -> SAP Solution Manager -> Basic Settings -> Standard Configuration of Basic Settings -> Solution Manager -> iBase -> Initially Create and Assign the Component Systems as iBase Components.
    23.2) or use the transaction IB51 to create the installed base.
    23.3) it is also possible to create the SOLUTION_MANAGER, select the solution and go to menu Edit -> Initial Data Transfer for iBase.
    24)Assign Business Partners to iBase Components
    IMG Path: SAP Solution Manager Implementation Guide -> SAP Solution Manager -> Basic Settings
    -> SAP Solution Manager System ->ServiceDesk-> iBase -> Assign Business Partners to iBase Components.
    *--optional--
    If you want to be able to assign the System Administrator: Go to the IMG: SAP Solution Manager Implementation Guide -> Customer Relationship Management -> Basic Function -> Partner Processing -> Define Partner Determination Procedure.
    Select the entry "00000032 Installed Base/IBase" and double click on Partner Functions in Procedure.
    Then copy the Entry "Contact Person (CRM)" to a new entry with the partner Function "System Administrator (CRM)" , save it.
    Go back to transaction IB52, select a component, and Goto -> Partner, you should be able
    now to assign the partner Function "System Administrator".
    25) Assign the SAP Standard Role to the user. Message Creator should have the role : SAP_SUPPDESK_PROCESS.
    26)Define the transaction variant for the message processors
    Go to the following IMG Path: SAP Solution Manager Implementation Guide -> SAP Solution Manager -> Configuration -> Scenario Specific Settings ->Service Desk -> General Settings -> Specify User Selection Variant.
    Here we will create variants for the central message processing transaction CRM_DNO_MONITOR.so that the user will have direct access to there dedicated message.
    27) Go to transaction PFCG
    27.1) Enter the role name as Z_MSG_PROCESSORS and choose single role.
    27.2) Give a description Message Processor role and save it.
    27.3) Go to the menu tab and choose add report
    27.4) select the report type : ABAP Report
    27.5) And in the report enter the report name as 'CRM_DNO_SERVICE_MONITOR'.
    27.6) Enter the previously created variant.
    27.7) flag the skip initial screen box.
    27.8) flag the SAPGUI for windows.
    27.9) Create a new transaction with tcode starting with Y or Z.
    27.10)Display this transaction and check the values at the bottom of the screen
    in the subscreen Default Values, you should have the following parameters:
    u2022 D_SREPOVARI-REPORT = CRM_DNO_SERVICE_MONITOR
    u2022 D_SREPOVARI-VARIANT = MY_TEAM_MSG
    u2022 D_SREPOVARI-NOSELSCRN = X
    And also all the user should have the correct role.

  • Problem when trying to rename uploaded images using session value

    Hi,
    I have a form where 9 images are uploaded made into thumb nail size and then stored in a file. What I´m trying to do is rename those thumbnails from their original name to username_0, username_1, username_2 etc for each of the 9 thumbs. The username comes from the registration form on the same page. I have created a session variable for the username and am trying to use that to change to name of the image name, whilst my images are uploading and resizing the name stays as the original and not as the new username_$number. I have pasted relevant code below and would very much appreciate any help with this:
    <?php session_start();
    // check that form has been submitted and that name is not empty and has no errors
    if ($_POST && !empty($_POST['directusername'])) {
    // set session variable
    $_SESSION['directusername'] = $_POST['directusername'];
    // define a constant for the maximum upload size
    define ('MAX_FILE_SIZE', 5120000); 
    if (array_key_exists('upload', $_POST)) {
    // define constant for upload folder
    define('UPLOAD_DIR', 'J:/xampp/htdocs/propertypages/uploads/');
    // convert the maximum size to KB
    $max = number_format(MAX_FILE_SIZE/1024, 1).'KB';
    // create an array of permitted MIME types
    $permitted = array('image/gif','image/jpeg','image/pjpeg','image/png');
    foreach ($_FILES['photo']['name'] as $number => $file) {
    // replace any spaces in the filename with underscores
    $file = str_replace(' ', '_', $file);
    // begin by assuming the file is unacceptable
    $sizeOK = false;
    $typeOK = false;
    // check that file is within the permitted size
    if ($_FILES['photo']['size'] [$number] > 0 && $_FILES['photo']['size'] [$number] <= MAX_FILE_SIZE) {
    $sizeOK = true;
    // check that file is of a permitted MIME type
    foreach ($permitted as $type) {
    if ($type == $_FILES['photo']['type'] [$number]) {
    $typeOK = true;
    break;
    if ($sizeOK && $typeOK) {
    switch($_FILES['photo']['error'] [$number]) {
    case 0:
    include('Includes/create_thumbs.inc.php');
    break;
    case 3:
    $result[] = "Error uploading $file. Please try again.";
    default:
    $result[] = "System error uploading $file. Please contact us for further assistance.";
    elseif ($_FILES['photo']['error'] [$number] == 4) {
    $result[] = 'No file selected';
    else {
    $result[] = "$file cannot be uploaded. Maximum size: $max. Acceptable file types: gif, jpg, png.";
    ................CODE BELOW IS THE INCLUDES FILE THAT MAKES AND TRIES TO RENAME THE THUMBS................................................
    <?php
    // define constants
    define('THUMBS_DIR', 'J:/xampp/htdocs/propertypages/uploads/thumbs/');
    define('MAX_WIDTH_THB', 75);
    define('MAX_HEIGHT_THB', 75);
    set_time_limit(600);
    // process the uploaded image
    if (is_uploaded_file($_FILES['photo']['tmp_name'][$number] )) {
    $original = $_FILES['photo']['tmp_name'][$number] ;
    // begin by getting the details of the original
    list($width, $height, $type) = getimagesize($original);
    // check that original image is big enough
    if ($width < 270 || $height < 270) {
    $result[] = 'Image dimensions are too small, a minimum image of 270 by 270 is required';
    else { // crop image to a square before resizing to thumb
    if ($width > $height) {
    $x = ceil(($width - $height) / 2);
    $width = $height;
    $y = 0;
    else if($height > $width) {
    $y = ceil(($height - $width) / 2);
    $height = $width;
    $x = 0;
    // calculate the scaling ratio
    if ($width <= MAX_WIDTH_THB && $height <= MAX_HEIGHT_THB) {
    $ratio = 1;
    elseif ($width > $height) {
    $ratio = MAX_WIDTH_THB/$width;
    else {
    $ratio = MAX_HEIGHT_THB/$height;
    if (isset($_SESSION['directusername'])) {
    $username = $_SESSION['directusername'];
    // strip the extension off the image filename
    $imagetypes = array('/\.gif$/', '/\.jpg$/', '/\.jpeg$/', '/\.png$/');
    $name = preg_replace($imagetypes, '', basename($_FILES['photo']['name'][$number]));
    // change the images names to the user name _ the photo number
    $newname = str_replace ('name', '$username_$number', $name);
    // create an image resource for the original
    switch($type) {
    case 1:
    $source = @ imagecreatefromgif($original);
    if (!$source) {
    $result = 'Cannot process GIF files. Please use JPEG or PNG.';
    break;
    case 2:
    $source = imagecreatefromjpeg($original);
    break;
    case 3:
    $source = imagecreatefrompng($original);
    break;
    default:
    $source = NULL;
    $result = 'Cannot identify file type.';
    // make sure the image resource is OK
    if (!$source) {
    $result = 'Problem uploading image, please try again or contact us for further assistance';
    else {
    // calculate the dimensions of the thumbnail
    $thumb_width = round($width * $ratio);
    $thumb_height = round($height * $ratio);
    // create an image resource for the thumbnail
    $thumb = imagecreatetruecolor($thumb_width, $thumb_height);
    // create the resized copy
    imagecopyresampled($thumb, $source, 0, 0, $x, $y, $thumb_width, $thumb_height, $width, $height);
    // save the resized copy
    switch($type) {
    case 1:
    if (function_exists('imagegif'))  {
    $success[] = imagegif($thumb, THUMBS_DIR.$newname.'.gif');
    $photoname = $newname.'.gif';
    else {
    $success[] = imagejpeg($thumb, THUMBS_DIR.$newname.'.jpg',50);
    $photoname = $newname.'.jpg';
    break;
    case 2:
    $success[] = imagejpeg($thumb, THUMBS_DIR.$newname.'.jpg', 100);
    $photoname = $newname.'.jpg';
    break;
    case 3:
    $success[] = imagepng($thumb, THUMBS_DIR.$newname.'.png');
    $photoname = $newname.'.png';
    if ($success) {
    $result[] = "Upload sucessful";
    else {
    $result[] = 'Problem uploading image, please try again or contact us for further assistance';
    // remove the image resources from memory
    imagedestroy($source);
    imagedestroy($thumb);
    ?>
    I hope i´ve supplied enough information and look forward to receiving any help or advise in this matter.

    Use double quotes here:
    $newname = str_replace ('name', '$username_$number', $name);
    Change it to this:
    $newname = str_replace ('name', "$username_$number", $name);

  • How to insert or upload image in RichTextEditor ?

    Hello everyone,
    I am new to flex and trying to design a full-fledged RichTextEditor in flex builder,Can anyone tell me how to add or upload image
    in RichTextEditor at users cursor location ?
    also user should be able to resize and move the image around the text editor.

    It can be done in either. There are 3 steps.
    Learn about greenscreen (keying) including lighting, filming, best formats for video (the way they do it in the weather segment) or masking and roto.
    learn about image editing including sizing images, color correcting, applying effects
    learn about controlling motion and editing duration of stills in a NLE or After Effects
    When you have a few of these basics down and have designed your production you then load up the video and the stills, key out the background or mask around your talent to separate the talent from the background, add your photos to the time line and animate their duration and position.
    This is extremely basic stuff that can be accomplished in a NLE or in AE. You can basically reproduce just about any effect you've ever seen in a movie in AE with the right planning and plug-ins. You can do just about anything you've ever seen in a news broadcast in any modern NLE.

  • How do i create a website that allows customer to upload images and text?

    I need some help i have a friend who has asked me if i can create a website that allows them to upload their own images and text at their leisure.
    His company is in the car sales trade so they need to regularly be updating their stock, and this needs to be done by somebody with limited computer knowledge so ease of use is fairly important.
    I am using dreamweaver cs4 on a G5 Imac running Snow leopard 10.6.8, my skills are limited to creating uncomplicated websites but i am very keen to learn, i am aware of content management systems such as Druplal but have zero knowledge on how to use these.
    Any assistance would be greatly appreciated
    Andy Barrington
    www.andybarrington.com

    You can take a read here
    http://www.hotscripts.com/category/php/scripts-programs/classified-ads/autos/
    http://icloudcenter.com/auto-dealer-car-sales-script.htm
    Although putting together a form that would upload images and all the descriptions required seems like a fairly straghtforward project, depending on your current skill set.
    Gary

  • Fetch data from a table present in production system

    Hello Gurus,
    I want to get data from a table which is present on production system. And i cannot create RFC. Can anybody tell me any other way of getting the data?
    Thanks in advance!!
    Regards,
    Kumail

    Hi,
    if it's just a one time requirement to get the data from the table into an excel sheet e.g. for some error analysis or for making a development decision, why bothering with development? Just run se11 or se16 display the whole content and save it as excel sheet via the menu. This would be the fastest solution in my opinion.
    If you do not have the permissions to see the table in production ask a admin or super user. Creating a program to dump data from the system you are not really allowed to see usually brings you in a lot of trouble :o).
    Kind Regards
    Roman

  • Storing Uploaded Image Path into Mysql

    Hi I am developing a cms and am using the code David gives in his book PHP Solutions,  everything works fine but I can't work out how to extract the uploaded path so that it is stored in my table.
    Help would be really appreciated, I am making good progress in learning the php especially with David's books but am still struggling when it comes to having to customized the code.
    The code for the upload.php is as follows,
    <?php
    class Gp1_Upload{
      protected $_uploaded = array();
      protected $_destination;
      protected $_max = 51200;
      protected $_messages = array();
      protected $_permitted = array('image/gif',
                                    'image/jpeg',
                                    'image/pjpeg',
                                    'image/png');
      protected $_renamed = false;
      public function __construct($path) {
        if (!is_dir($path) || !is_writable($path)) {
          throw new Exception("$path must be a valid, writable directory.");
        $this->_destination = $path;
        $this->_uploaded = $_FILES;
      public function getuploadpath (){
      public function getMaxSize() {
        return number_format($this->_max/1024, 1) . 'kB';
      public function setMaxSize($num) {
        if (!is_numeric($num)) {
          throw new Exception("Maximum size must be a number.");
        $this->_max = (int) $num;
      public function move($overwrite = false) {
        $field = current($this->_uploaded);
        if (is_array($field['name'])) {
          foreach ($field['name'] as $number => $filename) {
            // process multiple upload
            $this->_renamed = false;
            $this->processFile($filename, $field['error'][$number], $field['size'][$number], $field['type'][$number], $field['tmp_name'][$number], $overwrite);   
        } else {
          $this->processFile($field['name'], $field['error'], $field['size'], $field['type'], $field['tmp_name'], $overwrite);
      public function getMessages() {
        return $this->_messages;
      protected function checkError($filename, $error) {
        switch ($error) {
          case 0:
            return true;
          case 1:
          case 2:
            $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
            return true;
          case 3:
            $this->_messages[] = "Error uploading $filename. Please try again.";
            return false;
          case 4:
            $this->_messages[] = 'No file selected.';
            return false;
          default:
            $this->_messages[] = "System error uploading $filename. Contact webmaster.";
            return false;
      protected function checkSize($filename, $size) {
        if ($size == 0) {
          return false;
        } elseif ($size > $this->_max) {
          $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
          return false;
        } else {
          return true;
      protected function checkType($filename, $type) {
        if (empty($type)) {
          return false;
        } elseif (!in_array($type, $this->_permitted)) {
          $this->_messages[] = "$filename is not a permitted type of file.";
          return false;
        } else {
          return true;
      public function addPermittedTypes($types) {
        $types = (array) $types;
        $this->isValidMime($types);
        $this->_permitted = array_merge($this->_permitted, $types);
      protected function isValidMime($types) {
        $alsoValid = array('image/tiff',
                           'application/pdf',
                           'text/plain',
                           'text/rtf');
          $valid = array_merge($this->_permitted, $alsoValid);
        foreach ($types as $type) {
          if (!in_array($type, $valid)) {
            throw new Exception("$type is not a permitted MIME type");
      protected function checkName($name, $overwrite) {
        $nospaces = str_replace(' ', '_', $name);
        if ($nospaces != $name) {
          $this->_renamed = true;
        if (!$overwrite) {
          $existing = scandir($this->_destination);
          if (in_array($nospaces, $existing)) {
            $dot = strrpos($nospaces, '.');
            if ($dot) {
              $base = substr($nospaces, 0, $dot);
              $extension = substr($nospaces, $dot);
            } else {
              $base = $nospaces;
              $extension = '';
            $i = 1;
            do {
              $nospaces = $base . '_' . $i++ . $extension;
            } while (in_array($nospaces, $existing));
            $this->_renamed = true;
        return $nospaces;
      protected function processFile($filename, $error, $size, $type, $tmp_name, $overwrite) {
        $OK = $this->checkError($filename, $error);
        if ($OK) {
          $sizeOK = $this->checkSize($filename, $size);
          $typeOK = $this->checkType($filename, $type);
          if ($sizeOK && $typeOK) {
            $name = $this->checkName($filename, $overwrite);
            $success = move_uploaded_file($tmp_name, $this->_destination . $name);
            if ($success) {
                $message = "$filename uploaded successfully";
                if ($this->_renamed) {
                  $message .= " and renamed $name";
                $this->_messages[] = $message;
            } else {
              $this->_messages[] = "Could not upload $filename";
    ?>
    The code for my form page is this
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <?php
    //THE FOLLOWING CODE IS FOR THE UPLOADING OF IMAGES AND FILES
    // set the max upload size in bytes
    $max = 51200;
    if (isset ($_POST ['submit']))
                //define the path to the upload folder
                $destination = 'uploads/';
                require_once('classes/Upload.php');
                try {
                    $upload = new Gp1_Upload($destination);
                    $upload->setMaxSize($max);
                    $upload->move();
                    $result = $upload->getMessages();
                } catch (Exception $e) {
                    echo $e->getMessage();
    // END OF UPLOADING OF IMAGES AND FILES
    ?>
    <form id="newvenue" action="" method="post" enctype="multipart/form-data" >
          <?php
               // THIS CODE DISPLAYS ERROR MESSAGES FOR THE FILE UPLOADS
              if (isset($result)){
              echo '<ul>';
              foreach ($result as $message){
                  echo "<li>$message</li>";
              echo '</ul>';
           ?>
      <table id="neweventdisplay" cellpadding="5"  border="0">
        <tr>
      <td></td>
      <td><input type="hidden" name="user_id"  value="" /></td>
      </tr>
      <tr>
      <td></td>
        <td>Organisers Name</td>
        <td><input class="input80px" id="org_name" name="org_name" type="text" /> </td>
      </tr>
      <tr>
      <td></td>
      <td><label for="image">Upload image:</label></td>
      <td><p>
    <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max; ?>" />
    <input type="file" name="image" id="image" />
    </p></td>
    </tr>
      <tr>
      <td></td>
      <td>Details about your upload</td>
      <td><input class="input80px" id="org_uploadcapt" name="org_uploadcapt" type="text"  /></td>
    </tr>
      <tr>
      <td></td>
      <td><input type="submit" name="submit" id="submit" value="upload"></td>
      </tr>
      <tr>
      <td class="heading"> </td>
      <td></td>
      </tr>
    </table>
    </form>
    <prep>
    <?php
    if (isset ($_POST ['submit'])){
        print_r($_FILES);}
        ?>
        </prep>
    </body>
    </html>

    Hi David
    Thank you very much for your help.  I had continued to work on the code and had worked out how to input the image path into the database but it was using the original filename, so when every it is changed it did not work.  The code in my page at that point was the following,
    <?php     // 2. NEW USER REGISTRATION<br />
            include_once ("includes/form_functions.inc.php");
            $max = 100000;
            $destination = 'uploads/';
            // START FORM PROCESSING FOR A NEW REGISTRATION
            if (isset($_POST['submit'])) { // Form has been submitted.
            $errors = array();
            // perform validations on the form data
            $required_fields = array('org_name');
            $errors = array_merge($errors, check_required_fields($required_fields, $_POST));    
            $required_numberfields = array('user_id');
            $errors = array_merge($errors, check_number_fields($required_numberfields, $_POST));
            $fields_with_lengths = array('org_name' => 36, 'org_website' => 100, 'org_contact' => 40,  'org_conemail' => 80, 'org_contel' => 30);
            $errors = array_merge($errors, check_max_field_lengths($fields_with_lengths, $_POST));
            /*Here I am using trim as well as ucwords, this function converts the first letter of each work into a capital letter,  I am using this only on the
            firstname and surname to ensure that the data is how I want it as it is going  into the database,  The better the data is preformated the better the data
            swill be within the database.*/
            $org_name = trim(strtolower(mysql_prep($_POST['org_name'])));
            $org_website = trim(strtolower(mysql_prep($_POST['org_website'])));
            $org_contact = trim(strtolower (mysql_prep($_POST['org_contact'])));
            $org_conemail = trim(strtolower (mysql_prep($_POST['org_conemail'])));
            $org_contel = strtolower (mysql_prep($_POST['org_contel']));
            $userid = $_POST['user_id'];
            $org_uploadcapt = $_POST['org_uploadcapt'];
            $image = $_FILES['image'];
            /*Here is the code that takes the variable captured from the input form and matches it  up with the appropriate field in the database.  An important point with insertion is that  the variables are in the same order as the mysql field names, there will be an error if the number of variables does not match the number of field names.  Note that there is no entry for the user id as this is an auto increment file within mysql and so is not needed to be entered*/
            if ( empty($errors) ) {
                $sql = "INSERT INTO organiser
                          (org_name, org_website, org_contact, org_conemail, org_contel, user_id, org_uploadurl, org_uploadcapt)
                          VALUES
                          ('{$org_name}', '{$org_website}', '{$org_contact}', '{$org_conemail}', '{$org_contel}', '{$userid}', '{$destination}".$image['name']."', '{$org_uploadcapt}' )";
                $result = mysql_query($sql, $connection);
                if ($result) {
                    $message = "The organiser was successfully created.<br />";
                } else {
                    $message = "I am sorry but the organiser could not be added.";
                    $message .= "<br />" . mysql_error();
                } else {
                    /* this counts the number of errors and informs the user of how many fields were
                    incorrectly entered*/
                if (count($errors) == 1) {
                    $message = "There was 1 error in the form.";
                } else {
                    $message = "There were " . count($errors) . " errors in the form.";
        } else { // Form has not been submitted.
            $org_name = "";
            $org_website = "";
            $org_contact = "";
            $org_conemail = "";
            $org_contel = "";
            $userid = "";
            $org_uploadcapt = "";
    //THE FOLLOWING CODE IS FOR THE UPLOADING OF IMAGES AND FILES
    // set the max upload size in bytes
    if (isset ($_POST ['submit']))
                //define the path to the upload folder
                // Use This On The Local Hosting Machine
                //$destination = 'C:/upload_test/';
                // Use This On The Live Server
                require_once('classes/Upload.php');
                try {
                    $upload = new Gp1_Upload($destination);
                    $upload->setMaxSize($max);
                    $upload->move();
                    $result = $upload->getMessages();
                } catch (Exception $e) {
                    echo $e->getMessage();
    // END OF UPLOADING OF IMAGES AND FILES
    ?>
    <title>Horse Events</title>
    <?php include_once("includes/meta.inc.php");?>
    <?php include_once("includes/cssfavgoogle.inc.php");?>
    <link href="css/adminpanel.css" rel="stylesheet" type="text/css" />
    <style>
    input[type="number"] {
        width:40px;
    </style>
    </head>
    <body>
    <div id="wrapper">
        <div id="admincontent">
    <form id="newvenue" action="neworganiser.php" method="post" enctype="multipart/form-data" >
          <?php if (!empty ($message)) {echo "<p class=\"message\">" . $message . "</p>";} ?>
          <?php if (!empty ($errors)) {display_errors($errors); } ?>
          <?php
              // THIS CODE DISPLAYS ERROR MESSAGES FOR THE FILE UPLOADS
              if (isset($result)){
              echo '<ul>';
              foreach ($result as $message){
                  echo "<li>$message</li>";
              echo '</ul>';
           ?>
    <br />
          <table id="neweventdisplay" cellpadding="5"  border="0">
        <tr>
      <td></td>
      <td><input type="hidden" name="user_id"  value="<?php echo $url_userid ['user_id']; ?>" /></td>
      </tr>
      <tr>
      <td> <span class="compuls">*</span></td>
        <td>Organisers Name</td>
        <td><input class="input80px" id="org_name" name="org_name" type="text" />
         </td>
      </tr>
          <tr>
          <td><span class="compuls">*</span></td>
        <td>Their Website</td>
        <td><input class="input80px" id="org_website" name="org_website" type="text" /></td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
        <td>Organisers Contact</td>
        <td><input id="org_contact" name="org_contact" type="text" />eg: Mrs Jean Kelly</td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
        <td>Contact Email</td>
        <td><input class="input80px" id="org_conemail" name="org_conemail" type="text" />
          </td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
      <td>Contact Tel No.</td>
      <td><input id="org_contel" name="org_contel" type="text" /></td>
      </tr>
      <tr>
      <td></td>
      <td><label for="image">Upload image:</label></td>
      <td><p>
    <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max; ?>" />
    <input type="file" name="image" id="image" />
    </p></td>
    </tr>
      <tr>
      <td></td>
      <td>Details about your upload</td>
      <td><input class="input80px" id="org_uploadcapt" name="org_uploadcapt" type="text"  /></td>
    </tr>
      <tr>
      <td></td>
      <td><input type="submit" name="submit" id="submit" value="Add Your Organiser"></td>
      </tr>
      <tr>
      <td class="heading"> </td>
      <td></td>
      </tr>
    </table>
    <a  class="delete" href="controlpanel.php">Cancel</a>
    </form>
        </div>
    I have added the code you kindly forwarded but am getting an error,  I am still trying to learn the basics of php and am unsure of what to do next, my php Upload.php now looks like
    <?php
    class Gp1_Upload{
      protected $_uploaded = array();
      protected $_destination;
      protected $_max = 100000;
      protected $_messages = array();
      protected $_permitted = array('image/gif',
                                    'image/jpeg',
                                    'image/pjpeg',
                                    'image/png');
      protected $_renamed = false;
      protected $_filenames = array();
      public function __construct($path) {
        if (!is_dir($path) || !is_writable($path)) {
          throw new Exception("$path must be a valid, writable directory.");
        $this->_destination = $path;
        $this->_uploaded = $_FILES;
      public function getMaxSize() {
        return number_format($this->_max/100000, 1) . 'kB';
      public function setMaxSize($num) {
        if (!is_numeric($num)) {
          throw new Exception("Maximum size must be a number.");
        $this->_max = (int) $num;
      public function move($overwrite = false) {
        $field = current($this->_uploaded);
        if (is_array($field['name'])) {
          foreach ($field['name'] as $number => $filename) {
            // process multiple upload
            $this->_renamed = false;
            $this->processFile($filename, $field['error'][$number], $field['size'][$number], $field['type'][$number], $field['tmp_name'][$number], $overwrite);   
        } else {
          $this->processFile($field['name'], $field['error'], $field['size'], $field['type'], $field['tmp_name'], $overwrite);
      public function getMessages() {
        return $this->_messages;
      protected function checkError($filename, $error) {
        switch ($error) {
          case 0:
            return true;
          case 1:
          case 2:
            $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
            return true;
          case 3:
            $this->_messages[] = "Error uploading $filename. Please try again.";
            return false;
          case 4:
            $this->_messages[] = 'No file selected.';
            return false;
          default:
            $this->_messages[] = "System error uploading $filename. Contact webmaster.";
            return false;
      protected function checkSize($filename, $size) {
        if ($size == 0) {
          return false;
        } elseif ($size > $this->_max) {
          $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
          return false;
        } else {
          return true;
      protected function checkType($filename, $type) {
        if (empty($type)) {
          return false;
        } elseif (!in_array($type, $this->_permitted)) {
          $this->_messages[] = "$filename is not a permitted type of file.";
          return false;
        } else {
          return true;
      public function addPermittedTypes($types) {
        $types = (array) $types;
        $this->isValidMime($types);
        $this->_permitted = array_merge($this->_permitted, $types);
      protected function isValidMime($types) {
        $alsoValid = array('image/tiff',
                           'application/pdf',
                           'text/plain',
                           'text/rtf');
          $valid = array_merge($this->_permitted, $alsoValid);
        foreach ($types as $type) {
          if (!in_array($type, $valid)) {
            throw new Exception("$type is not a permitted MIME type");
      protected function checkName($name, $overwrite) {
        $nospaces = str_replace(' ', '_', $name);
        if ($nospaces != $name) {
          $this->_renamed = true;
        if (!$overwrite) {
          $existing = scandir($this->_destination);
          if (in_array($nospaces, $existing)) {
            $dot = strrpos($nospaces, '.');
            if ($dot) {
              $base = substr($nospaces, 0, $dot);
              $extension = substr($nospaces, $dot);
            } else {
              $base = $nospaces;
              $extension = '';
            $i = 1;
            do {
              $nospaces = $base . '_' . $i++ . $extension;
            } while (in_array($nospaces, $existing));
            $this->_renamed = true;
        return $nospaces;
      protected function processFile($filename, $error, $size, $type, $tmp_name, $overwrite) {
        $OK = $this->checkError($filename, $error);
        if ($OK) {
          $sizeOK = $this->checkSize($filename, $size);
          $typeOK = $this->checkType($filename, $type);
          if ($sizeOK && $typeOK) {
            $name = $this->checkName($filename, $overwrite);
            $success = move_uploaded_file($tmp_name, $this->_destination . $name);
            if ($success) {
                $message = "$filename uploaded successfully";
                if ($this->_renamed) {
                  $message .= " and renamed $name";
                $this->_messages[] = $message;
            } else {
              $this->_messages[] = "Could not upload $filename";
      public getFilenames() {
        return $this->_filenames;
    ?>
    The error is Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE.   
    I have not worked with oop before and have only very briefly looked at the principle was on my foundation degree.

  • Solman 7.1 SP10 delete product system in SMSY

    Hi,
    Somehow in my Solman 7.1 sp10 a product system is in SMSY and not in LMDB but in this SP I´m unable to delete it using SMSY and as the product system is not in LMDB, I don´t find how to do it.
    Anyone knows how to delete it.
    Regards,

    Hi Vevek,
    If it's not associated with LMDB and the data source is SLD or TMS/RFC and the date and time stamp is out-dated, then you can delete the product system in SMSY by switching to Edit mode. If the data source is LMDB, then it needs to be done via LMDB. I hope that helps to address the issue. If not please open a message with SV-SMG-SYS.
    Regards,
    Jay Soma.

Maybe you are looking for