Quantcast
Channel: SCN : Discussion List - Business Server Pages (BSP)
Viewing all 237 articles
Browse latest View live

Function Module BINARY_RELATION_CREATE exception internal_error

$
0
0

Hi guys,

 

sometime I get expetion internal_error from FM BINARY_RELATION_CREATE while trying to create the binary relationship to the Order (Order = e.g. AUFK-AUFNR). Please help me to find out, why sometimes I get some error and sometimes it works fine.


CALL FUNCTION'BINARY_RELATION_CREATE'
     EXPORTING
       obj_rolea            = is_object
       obj_roleb            = is_attachment
       relationtype         = 'ATTA'
    IMPORTING
      binrel               = binrel
    TABLES
      binrel_attrib        = binrel_attrib
    EXCEPTIONS
      no_model             = 1
      internal_error       = 2
      unknown              = 3
      OTHERS               = 4
     

 

Thanks and regards

Britta


BSP checkbox- updating field in table

$
0
0

Hi Experts,

 

I have a custom field in a table hrp5102, created to update the status of the checkbox which is on a bsp page( candidate registration in E-recruitment).

I have created the checkbox on the bsp page with a hardcoded text. Now, if a candidate checks it (or otherwise) , the status should get updated for that candidate in the HRP5102 table. Please provide your inputs on how to do that!!

 

Thanks in advance.

 

Regards,

Nishant

Automatic redirect to entry page

$
0
0

Hello,

 

I'm developing a stateful BSP app that has to start with the specific entry page, so if users somehow navigate to a non-entry page (e.g. via a bookmark or by refreshing that page after their session has timed out) they should be redirected back. What I have came up with is this check:

 

IF application->my_state_property IS INITIAL.     response->redirect( '../MAIN/default.htm' ).     EXIT.
ENDIF.

 

This works, but I don't like having to insert this bit into every page while keeping track of the relative URL, and  relative redirects seem to be disallowed by HTTP specs. Is there a better way?

 

Thanks,

Pavel.

Hellp on BSP

$
0
0

Hy to all,

 

i have a layout designed in pure HTML;

in particular I have a table with 2 ROW  where each cell (big cell)  is editable.

For example,  if in  in the cell A (first row)   i  insert an article then  in the cell B ( first row)  should appear automatically the price (taken from SAP) with an ENTER.

 

there is any way..

 

Thanks a lot

How to position a checkbox within a tableview

$
0
0

Hi All,

 

I'm currently developing an application using a tableview iterator.

 

One of the fields is to be displayed as a checkbox using the cl_htmlb_checkbox class. The code is embedded inside the 'RENDER_CELL_START' method of the table iterator class as follows:

 

DATA chk TYPE string.

chk = m_row_ref->xspeb.
p_replacement_bee = cl_htmlb_checkbox=>factory( id = p_cell_id                                                checked  = chk ).

 

XSPEB is a char1 field.

 

The problem is that the check box displays as left justified within the field cell when it is displayed on the screen.

 

Does anyone know how to force a checkbox to be centrally justified within a field cell in a table view iterator?

 

Thanks,

 

Nick.

Web Dynpro ABAP dropdown on mobile device - best practice?

$
0
0

Hello,

 

I know that Web Dynpro for ABAP is not supported by mobile devices. The rendering seems to works, but the dropdown box is not usable on Google Chrome, iPhone or Android. I read here in the forum that avoiding this dropdown is the only solution.

 

But it won't be the best solution, how knows which user agents future devices will send and then maybe we will see a "Your browser is not supported" like in IE10 for WebDynpro Java...

 

So I read your suggestions to use BSP, ITS mobile or new technologies like SAPUI5.

 

Here are my thoughts - any inputs are appreciated:

 

BSP comes with SAP, and I think it's biggest advantage is to directly code ABAP and re-use some parts of Web Dynpro ABAP - like data selections or function calls. (Maybe some jQuery or CSS can be included to give it a nice look?)

 

But today I stumbled about one error:

  • <htmlb:content>:  (*) This browser is not supported; for Design2003 the Internet Explorer as of 5.50 and the Mozilla as of 1.75 are supported

So maybe I should just use plain HTML tags and no HTMLB?

 

ITS mobile is more about mobile webpage for old phones or scanners - I think there is a fixed layout, so the whole logic needs to be recreated in a dynpro and then the mobile pages have to be generated, but anyway - I can use ABAP.

 

SAPUI5 is a whole new technology from SAP and it seems this is their future direction for user interface - good approach - device independent and so on. So first step would be "patching up" the system that SAPUI5 can be used. But I can't use ABAP code directly. So no direct "select * from ...". I would need an extra NetWeaver Gateway installation, implement for all my ABAP logic OData services and then I would be able to bind my data to an input element.

 

So from my point of view, BSP seems here like the winner, because I think I have the most control over the HTML code AND can use ABAP.

 

But I keep an eye on the Neptune Application designer. It seems more like an ABAP+HTML approach - but didn't get my hands on this up until know.

 

So what do you think?

Class connection to BSP page

$
0
0

I have a error in a bsp app which is dumping in some conditions. The only clue I am getting in ST22 is a pointer to a bsp generated class named something like:

CL_O2AH7ZCIJP6MCKNV45ALQC...

 

Is there an easy way to map this back to the specific BSP page in my application?

 

Thanks in advance.

 

Nigel

HAP_DOCUMENT Template Substatus

$
0
0

Hi,

 

anyone who knows how I can get all substatus of a specific template. I found function module HRHAP_TEMPLATE_GET_STATUSES for status. Is there something similar for all template substatus?

 

Thanks.

 

/Elvez


Sap appcontext cookie

$
0
0

HI all,

I'm looking for a way to change or better yet remove the client cookie sap-appcontext from my bsp application.

 

any guidance would be appreciated

 

i have tried setting the cookie to a newly created guid on the request object but it doesn't work

 

Thanks David 

BSP or not BSP - Date Mask and Word Count?

$
0
0

Hello Folks,

 

On the field we are faced with all sorts of crazy requirements, this is my current problem...

 

Taking usability to a next level, a customer wants that all the fields from, lets say VA01 or MM01, should be able to do:

- Date field: it should have a mask like "__/__/__"; as soon as you start typing it will dynamically check and format the date;

- Text field: it should have a word count, or even a remaining characters to reach maxlength;

 

How could we achieve such behavior - client side validation with SAP?

Any crazy idea of how to embed javascript?

 

All the best,

Marlo Simon

Encrytion of BSP Application URLs

$
0
0

Dear colleagues,

I'm facing a peculiar problem. I have a BSP application, the URL of which is in the format

http://<messageserver:<port_no>/sap/bc/bsp/sap/<bsp_app_name>/start.do

Now one of the customer has come back with a request that if anybody knows the bsp application name and has hacked the password one way or other, then the person can easily logon to the system and do whatever is possible.

The main concern is that as all our bsp application URLs have standard format, so it is possible to just substitute bsp_app_name with another bsp application name and then give password to work with it.

His request is to encrypt the URL. Is it possible? Any pointers in this direction will be helpful.

Regards,

Priyanka

 

p.s I have posted this message also in the roadrunner newsgroup.

How to position (center) a checkbox within a tableview

$
0
0

Hi All,

I'm currently developing an application using a tableview iterator.

Two of the fields are displayed as a checkbox using the cl_htmlb_checkbox class.

The problem is that the check box displays as left justified within the field cell when it is displayed on the screen.

Does anyone know how to force a checkbox to be centrally justified within a field cell in a table view iterator?

 

IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS:

 

  APPEND  INITIAL LINE TO  P_COLUMN_DEFINITIONS ASSIGNING <R>.

  MOVE:  'FRUEH'       TO <R>-COLUMNNAME,

         '100px'       TO <R>-WIDTH,

         'CENTER'      TO <R>-HORIZONTALALIGNMENT,

         'Frühstück'   TO <R>-TITLE.

  APPEND  INITIAL LINE TO  P_COLUMN_DEFINITIONS ASSIGNING <R>.

  MOVE:  'MITTA'       TO <R>-COLUMNNAME,

         'CENTER'      TO <R>-HORIZONTALALIGNMENT,

         '100px'       TO <R>-WIDTH,

         'Mittagessen' TO <R>-TITLE.

 

Thanks

RoBu di AQu

Problem: Access-Control-Allow-Origin

$
0
0

Hi,

 

we are using a small BSP application to create a xml file. Now we tried to get this file per AJAX http request and receive following error message:

 

Origin ***** is not allowed by Access-Control-Allow-Origin.

 

I know, that most browsers block cross-domain requests, if the requested page doesn't allow it.

 

We set two header fields within the BSP page:

 

runtime->server->response->set_header_field( name  = 'Access-Control-Allow-Origin'                                             value = '*' ).
runtime->server->response->set_header_field( name  = 'Access-Control-Allow-Methods'                                             value = 'POST, GET' ).

 

Problem seems to be, that field names are converted to lower case (they are case sensitive), so that:

access-control-allow-origin: *

access-control-allow-methods: POST, GET

is send to the browser.

 

We tested this on a Web AS 620 and 700, both show header field names only in lower case.

 

Does anyone has an idea how we can solve this problem?

 

Regards,

Sven Klußmann

 

Generate Download Dialog from Ajax Input on BSP

$
0
0

Hello All,

 

I'm having some unusual issues with my BSP page that I can't seem to work around. Any input would be greatly appreciated. I'll give as much detail as possible, because the issue only exists at a certain point.

 

Overview: I'm creating a simple bsp with input fields that once filled the user hits a 'submit' button and the field entries are sent back to SAP via ajax in an simple 'POST'. The fields are read into SAP and a report is generated and converted to xstring. This xstring is then sent back to the BSP using the cl_bsp_utility=>download. Herein lies the problem. The webpage responds to this as a 'message'. If I test this functionality on initialization it is fine, but as a response it doesn't work. Very odd.

 

Here is my html: (Don't critique the hard-coded values, I'm not worried about that yet).

<!DOCTYPE html>

<html>

     <head>

         <meta charset="utf-8" />

         <meta name="viewport" content="width=device-width, initial-scale=1" />

         <title>

         </title>

         <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.css" />

         <link rel="stylesheet" href="usl_cc_01.css" />

         <style>

             /* App custom styles */

         </style>

         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">

         </script>

         <script src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.js">

         </script>

         <script src="usl_cc_01.js"></script>

         <script src="usl_cc_02.js"></script>

     </head>

     <body>

         <!-- Home -->

         <div data-role="page" id="page1">

             <div data-theme="b" data-role="header">

                 <h3>

                     Cost Center Reporting

                 </h3>

             </div>

             <form id="target">

             <div data-role="content">

                 <div data-role="fieldcontain">

                         <label for="userId">

                             Name

                         </label>

                         <input name="userId" id="userId" placeholder="" value="" type="text" class="required" />

                 </div>

                 <div data-role="fieldcontain">

                         <label for="password">

                             Password

                         </label>

                         <input name="password" id="password" placeholder="" value="" type="password" class="required"/>

                 </div>

                 <div data-role="fieldcontain">

                         <label for="reportType" class="select" data-mini="true">Report Type</label>

                         <select name="reportType" id="reportType">

                           <option selected="selected">Actual</option>

                             <option>Plan/Forecast</option>

                         </select>

                 </div>

                 <div data-role="fieldcontain">

                         <label for="period">

                             Period

                         </label>

                         <select name="period" id="period">

                           <option selected="selected">001</option>

                             <option>002</option>

                             <option>003</option>

                             <option>004</option>

                             <option>005</option>

                             <option>006</option>

                             <option>007</option>

                             <option>008</option>

                             <option>009</option>

                             <option>010</option>

                             <option>011</option>

                             <option>012</option>

                             <option>013</option>

                         </select>

                 </div>

                 <div data-role="fieldcontain">

                         <label for="year">

                             Year

                         </label>

                         <select name="year" id="year">

                           <option selected="selected">2010</option>

                             <option>2011</option>

                             <option>2012</option>

                             <option>2013</option>

                             <option>2014</option>

                             <option>2015</option>

                             <option>2016</option>

                             <option>2017</option>

                             <option>2018</option>

                             <option>2019</option>

                             <option>2020</option>

                         </select>

                 </div>

                 <div data-role="fieldcontain">

                         <label for="version">

                             Version

                         </label>

                         <select name="version" id="version">

                             <option>PF - USL Plan Version Final</option>

                             <option>R1 - USL Rolling Forecast April - December</option>

                             <option>R2 - USL Rolling Forecast July - December</option>

                             <option>R3 - USL Rolling Forecast October - December</option>

                         </select>

                 </div>

                 <input id="submitToSap" type="button" data-icon="search" data-iconpos="left" value="Submit to SAP" />

                 <input id="emailMePass" type="button" data-icon="info" data-iconpos="left" value="Email Password" />

             </div>

             </form>

         </div>

         <script>

 

         </script>

     </body>

</html>

My simple js is just this:

// JavaScript Document

$(document).ready(function() {

    $('#submitToSap').click(function() {

        // Compile data to send to SAP server

        var cc_data_string =

                      '&purpose=view' +

             '&userId=' + $("input#userId").val() +

             '&password=' + $("input#password").val() +

             '&reportType=' + $("select#reportType").val() +

             '&period=' + $("select#period").val() +

             '&year=' + $("select#year").val() +

             '&version=' + $("select#version").val();

          

                               $.ajax({

                                type: "POST",

                          url: "usl_cc_01_control.do",

                    data: cc_data_string,

                                            success: function(ret){

                                                            alert(ret);

                        }

          });

           });

});


My Controller has a simple DO_REQUEST.

DATA: l_view TYPE REF TO if_bsp_page,

           lt_fields TYPE tihttpnvp.

 

   request->get_form_fields( CHANGING fields = lt_fields ).

 

   IF lt_fields IS INITIAL.

     l_view = create_view( view_name = 'usl_cc_01.html').

     call_view( l_view ).

   ELSE.

     process_input( lt_fields ).

   ENDIF.

 

And the Process_input:

DATA: l_view TYPE REF TO if_bsp_page,

         ls_field  TYPE ihttpnvp.

 

* Refresh model if necessary

   IF m_cc_model IS NOT BOUND.

     do_init( ).

   ENDIF.

 

   READ TABLE lt_fields INTO ls_field WITH KEY name = 'purpose'.

"Here is where I do my simple ABAP logic to generate a report, send it to the spooler, convert to pdf and then convert to xstring.

"My xstring is outputx

     CONCATENATE cl_abap_char_utilities=>byte_order_mark_little outputx INTO outputx IN BYTE MODE.

      DATA: app_type TYPE string VALUE 'APPLICATION/PDF;charset=utf-16le'.

        CALL METHOD cl_bsp_utility=>download

            EXPORTING

              object_s            = outputx

              content_type        = app_type

              content_disposition = 'attachment;filename=your_cc.pdf'

              response            = server->response

              navigation          = navigation.


However...the webpage responds with a dialog that says 'message from webpage'. ???

I've created a test webpage that does the download dialog from the start and it works fine and generates the pdf, but as a response to an input it responds with 'message from webpage' and not the dialogue. Any help would be so greatly appreciated, I'm spinning my wheels here. All the 'pieces' are fairly simple, but something is amiss as a whole.

 

Thanks for any help,

Greg

 

PS. I'm still working on it, if I find the solution I'll make sure to post it.


BSP and changing password at login

$
0
0

hi there,

 

we are using BSP application HCM_LEARNING.

 

when i have a new user in SAP, he gets an initial password.

 

When the users gets the popup for login to the BSP application there is NO possibility for entering a NEW password. He can

use his initial passwort for entering the BSP application.

 

how can i force the user to change his password  @first login as it works in SAP-GUI ???

 

br, Martin


Popup Bsp View Loads Twice

$
0
0

Hi All

 

I have a strange problem.

From the Web IC mvc application I use javascript to display a view with flow logic in a popup modal window.  this view has a textedit and and button.

 

The javascript loads the window, I hit the button and another instance of the window appears as a full page not a modal window.

 

Has anyone ever experienced this.  Any help would be great.

 

Here is the javascript code that is triggered from an onclientclick button event.

 

function ModalWindow(bpnum) {

    var popup = '/sap/bc/bsp/sap/zic_*****/NoteView.htm?BPNUM=' + bpnum;

    var result = window.showModalDialog(popup,'SalesNote',"dialogHeight:325px,dialogWidth:380px, status:no, help:no, resizable:no;");

    result.moveTo(400,100);

    result.focus();

 

  }

Changing date format in Standard BSP application

$
0
0

Hi,

 

We are accessing a standard BSP application via external alias. There are 2 input fields for choosing dates. Currently by default on click of date navigator, we are seeing date in DD.MM.YYYY format. Our expectation is to make it appear in MM/DD/YYYY format.

 

Since sap user id & password is not asked when accessing the BSP application,changing user profile settings has not helped.

 

It is related to SLC supplier registration screen. At present, i haven't been able to find scripting done for the input fields.

 

Any inputs to achieve this requirement will be of great help.

 

Looking forward to responses.

Need Help with onInputProcessing event in BSP

$
0
0


HI All,

 

I have created a BSP page which is used to create Returns. This has a file upload element on the screen that I will upload and attach once the user hit sthe button to create the return. When the user hits the upload button for the file I want to upload that file to SAP and

then let them finish doing their inputing and hitting submit to create their Return. The problem I am having is that when they hit upload the file is going to SAP but after the onInputProcessing event the page gets redisplayed with blank values. How do I redisplay the page with what ever the user typed in?

 

Tom

BSP error TOKEN_NOT_FOUND

$
0
0

Hi,

 

Recently we have upgraded our SRM system from 5.0 to SRM 7.02. After this, our SUS supplier is getting a strange error during the PO processing. When the user starts the SUS application and opens the PO, everything goes fine. They can do the POR and POC for 3 or 4 PO's continuously and after that they are getting the error "TOKEN_NOT_FOUND". This is happening periodically and everytime the user has to login again to continue the work till 3 or 4 PO processing. then again the same error appears.

 

I have gone through the OSS notes and applied the note "1789274" even though it is some what irrelevant. I have also checked the note "1607167" and "1944698" but nothing helped me. Still the suppliers are getting this error.

 

Also for this type of issue, SAP is giving a common solution like, enable the Statr BSP option for the JS file in the folder "Pages with Flow Logic". Can I also follow the same for Scripts.js in the BSP application SRMSUS?

 

I need some help on this.

 

Thanks,

Mahendran B.

Maximum rows in Textedit BSP elemet

$
0
0

Dear All,

 

I have a textedit BSP element as defined below

 

            <htmlb:textEdit id  = "TEST"

                            text     = "<%= G_COMM %>"

                            cols     = "230"

                            rows     = "8"

                            wrapping = "SOFT"

                            />

 

so this shows a text edit box with 8 rows visible. If user enters text beyond 8 rows, a scroll bar appears and first line moves upwards. Now I want to restrict this box only to 8 rows, so that user cannot enter beyond 8 rows and no scrollbar should appear. I checked one blog, which shows how to restict maximum number of characters which can be entered in textedit box. But I want to restrict it till particular rows.

 

Please let me know your valuable inputs to get it done.

 

Thanks,

Amol

Viewing all 237 articles
Browse latest View live