Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all 4552 articles
Browse latest View live

In comlaint creation screen two fields available, iwant to show these two fields into Complaint search page and result page..these two fields are standard ..how to add it..please help

$
0
0

HI team,

 

In complaint screation Two fields available, I want to show these two fields into Complaint search screen and complaint result screen.How to do it..these two fields are standard.

 

Two fields in component - BTCATEGORIES

 

Search component -BT120S_CPL.

 

Please help..

 

Regards

Kalpana


"An exception with the type CX_SY_MOVE_CAST_ERROR occurred, but was neither handled, nor declared in a RAISING clause ".

$
0
0

Hi team,

 

iam getting standard errro while iam execting the quotation in actions...Iam getting an error like screeen shot below..

please help me on this.SCN.PNG

Work center for MRS

$
0
0

Hello Experts,

 

  Along with the CRM system licence, i heard that MRS(Multi resource scheduling) will be also be part of it.  Please let me know what is the WOrkcenter name and in which standard business role can i find this application/ COmponent.

 

Thanks alot.

 

BR,

Nikhil Kulkarni

CRM BP communication field data are grey out after change to edit mode no value display

$
0
0

Hi,

 

i am able to maintain communication data from GUI but when i am trying to check or create in web ui the same data is not displaying  .and the filed are grey out

 

please suggest me how i  can populate communication data in WEB UI.

 

issue.PNG

Action profile:sending email and remainder alarts after 7 days

$
0
0

Hello experts,

 

Greetings,

 

                     I am in situation to complete these object ASAP.

 

Object     1.Complaint auto acknowledgement mail to be sent to customer .

 

               2.Physical Inspection Report mail.

 

               3.Quotation Reminder Mail and remainder alerts after first week and second week .

 

It will more be helpful if somebody shares any document or approach to fulfill these tasks. My ID: nazma.sap369@gmail.com .

 

I am quite new to this topic and I tried with searching in Google couldn't find end to end approach.

 

 

Thanks&regards

Nazma.

Create Docflow between Items with BOL

$
0
0

Hello everybody,

 

recently I try to create a dowflow relationship between two items (BUS1000130) below opportunities (BUS1000111). As there no BOL method for docflow creation exists below BOL relation BTItemDocFlowSet/BTDocFlowAll, I was wundering if maybe the method createDocFlow of BTOrderHeader can be facilitated in some way also to create docflow between items.

 

I tried this and gut a dump which says, that an item docflow linkage cannot be created without a header docflow linkage. This sounds sensible but actually a doflow relation between the two parent opportunities of the items exists. So I'm not sure if I the parameters which I hand over to the method createDocFlow are correct. I call the method this way:

 

TRY.

       CLEAR lt_params.

       CLEAR ls_params.
       ls_params-name  = 'OBJKEY_A'.
       ls_params-value = ir_main_file->get_property_as_string( 'GUID' ).
       APPEND ls_params TO lt_params.

       CLEAR ls_params.
       ls_params-name  = 'OBJTYPE_A'.
       ls_params-value = 'BUS2000130'.
       APPEND ls_params TO lt_params.

       CLEAR ls_params.
       ls_params-name  = 'OBJKEY_B'.
       ls_params-value = ir_supdlv_file->get_property_as_string( 'GUID' ).
       APPEND ls_params TO lt_params.

       CLEAR ls_params.
       ls_params-name  = 'OBJTYPE_B'.
       ls_params-value = 'BUS2000130'.
       APPEND ls_params TO lt_params.

       CLEAR ls_params.
       ls_params-name  = 'RELTYPE'.
       ls_params-value = iv_rel_type.
       APPEND ls_params TO lt_params.

       CLEAR ls_params.
       ls_params-name  = 'BREL_KIND'.
       ls_params-value = 'B'.
       APPEND ls_params TO lt_params.

       lr_parent_section ?= ir_supdlv_file->get_parent( )->get_parent( ).

       IF lr_parent_section IS BOUND AND lr_parent_section->get_name( ) EQ 'BTAdminH'.

         lr_parent_section->execute(
                     iv_method_name = 'createDocFlow'
                     it_param       = lt_params ).

       ENDIF.

 

I create try to create the docflow underneath the start opportunity named "lr_parent_section". OBJKEY_A is the GUID of the item below lr_parent_section. The OBJKEY_B is the GUID of the item underneath the other opportunity. As I see no possibility to hand over a GUID for the header of this opportunity, I'm not sure how to transport the header linkage of the two opportunities. As this docflow already exists, no check seems to be made between within the docflow creation method.

 

Can anybody give me a hint how to handle this problem? Would be great...

 

Thanks and best regards,

Markus

In crm web ui, not getting MRS link?

$
0
0

In crm web ui,  not getting Multi-Resource Scheduling link?

 

please help us

Unable to move the fields from Available to Selected fields

$
0
0

Hi,

 

For one of the system we work we found that we are not able to move the fields from Available to Selected .

 

-> We open a component

-> Choose a view

-> Click on Configuration and EDIT

-> Click on Create

-> Click on Show Available fields

-> Now when we select Available field they are not getting selected .

 

Any idea of any notes to be implemented.

 

 

Thanks ,

Rajesh P


Suggestions required for collecting the customer feedback.

$
0
0

Hi Experts,

 

I need your suggestions for collecting the customer feedback.

we have requirement to collect the customer feedback based on there travel which the client is offering to the customer. It might be comment/appreciation/enquiry/complaint.

 

We have many custom fields in this development. Is there any std BT in CRM to collect these data or i need to go for custom development which involves the custom genil model and component?

We don't have any product master data here. No ECC integration only we need to maintain the customer feedback.

 

Please provide valuable suggestions.

 

Thanks & Regards,

GK.

Adding a Custom field on Overview Page (form view section) on CRM WebUI Client

$
0
0

Hello Friends,

 

How to add a custom field on Overview Page (for example: Account Overview Page: BP_HEAD component) so that whenever we change the field value on Overview Page (Form View Section) and Save the page, the field value should be saved in the database and the next time when we open the overview page the newly changed value should be displayed on the overview Page.

 

The above requirement should work in the below 2 scenarios:

 

1) When the field we are adding is already available in any of the relationships with the Root Object.

2) When the field is not available in any of the relationships with the Root Object.

 

What are the detailed steps to do the above.

Friends, please help me out on the same.

CL_CRM_DOCUMENT - Why I can't attach MS Word Document to my Task?

$
0
0

Dear Experts,

 

within a report I am creating Tasks (BUS2000125) and after creating the tasks I want to attacht to every task an MS Word Document wich I have created in the same report too. With the OLE Functionality I am creating the Word Documents without errors or problems. The I use method cl_crm_documents=>create_with_file and there I got no errors too. But when I want to see the attachment it is not there. The MS Word Document is saved in an 'normal' folder on the same server where the SAP is intalled. What I am doing wrong. Why it is not attaching the Word Document to my Task?

 

DATA: 
lv_file_save_as        TYPE c LENGTH 255,
lv_nombre_fichero    TYPE sdok_filnm,
lv_directory                TYPE sdok_chtrd,
ls_loio                        TYPE skwf_io,
ls_phio                      TYPE skwf_io,
ls_error                     TYPE skwf_error,
ls_business_object     TYPE sibflporb.

 CLEAR ls_guid.

  LOOP AT lt_guid INTO ls_guid.    ls_business_object-instid  = ls_guid-guid.    ls_business_object-typeid = 'BUS2000125'.    ls_business_object-catid   = 'BO'.    lv_directory = '\\SRVDRMSAP\logs_crm_actividades\'.    lv_nombre_fichero ='Name_of_word_document.doc'.          CALL METHOD cl_crm_documents=>create_with_file      EXPORTING        file_name       = lv_nombre_fichero        directory       = lv_directory
*       properties      =
*       properties_attr =        business_object = ls_business_object
*       parent_folder   =
*       package_id      =      IMPORTING        loio            = ls_loio        phio            = ls_phio        error           = ls_error.

 

AET in dependent Object

$
0
0

Hi Experts,

 

  I am having a requirement where i need to add 5 fields in the table BUT0ID, which is a business partner Identification table. I need to add the same 5fields in corresponding structure CRMT_BUPA_IL_IDENTIFICATION. So that i can able to use those fields in webui and i can save the values in BUT0ID table. How i will achieve this? Need your help.

 

Note :

 

1. BUILIDNUMBER is the dependent object.

2. Component : BP_DATA/Account ID number list , Context node : Builidnumber

3. structure CRMT_BUPA_IL_IDENTIFICATION has enhanced 'category as cannot be enhanced' not able to add append structure.

 

 

Thanks,

Arun

Form view Folder action with fields in webui

$
0
0

Hi All,

 

I need to create  numbers Folders in form along with fields .

 

If i click on the folder, it will open the Input fields.

 

  Folder name ( Expand and Collpase)

   ->>>> 1 (AET field 1)

->>>>>>2 ( AET field 2)

->>>>>3  ( AET field 3 )..like this .

 

We need to keep multiple folders in the Form view.

 

 

Regards,

rama

Error during object generation - EEWB - Urgent

$
0
0

Hi,

We are using standalone CRM 5.0

 

While trying to create custom fields via EEWB, we are getting the following error.

 

Task BUPA_CI_FILL_CRDCLNT200

No CRDCLNT200 transport request exists for System Workbench.

 

When I double click on the system message, I get the following detail:

 

"Error during object generation - Message no. OXT_MISC313"

 

Error during object generation

 

    Message no. OXT_MISC313

 

Diagnosis

 

    Errors occurred when generating objects of your extension.

 

 

 

Procedure

 

    You can analyze the errors as tasks in the error log of your extension

    (register Log in the extension detail screen) or as tasks marked with

    errors in the navigation tree.

 

 

Have anybody experienced this before? your inputs will be helpful.

 

Regards,

Anil

Configuration not determining

$
0
0

Hi,

 

I have added some new assignment blocks into 3 existing configuration at component level. Initially it was appearing fine. But now changes are appearing for only one configuration and for other 2 configurations it's not, but i don't know where the change happened.

 

those 3 configurations are separately assigned to 3 business roles. I can see the changes in only one business roles not for other business roles.

I Just want to know which changes may be effect the issue and i have cross checked the 3 configurations existed in component level.

 

Thanks,

Subbu.


Trigger roundtrip for date field

$
0
0

Hi All,

 

How to make a date field trigger a round trip after user chosed a date?

 

I did the following in P, but it does not trigger it.

 

    case iv_property.

  when if_bsp_wd_model_setter_getter=>fp_fieldtype.

    rv_value = cl_bsp_dlc_view_descriptor=>if_bsp_dlc_view_descriptor~field_type_input.

  when if_bsp_wd_model_setter_getter=>fp_server_event .
    rv_value = 'ENTER'.
  endcase.

 

tks for your hints in advance.

re: Text field value refereshes before Do_request

$
0
0

Hi,

Facing an issue.  In the Email screen Component(BT126H_mail) the To Address field is getting automatically resets to old value

as soon as the send buttons is clicked,  I debugged it, this happens before the on_request call

 

could not catch it.. as it happens before any debugging starts

 

pfa the screen shots.. I have blurred the official email ids mentioned in that please don't mind

 

thanks

Table or FM which stores CSR UI log

$
0
0

Hi All,

There is one activity performed by CSR on particular day.

It starts one query in database server , which ran for more than a day.

I will attach Query details which i got from DB Team  .

But my requirement is  can we find what CSR has done at that time  via any FM or Table .

I am having CSR id and timestamp.

Please help.

 

Points will be rewarded.

 

 

Query screen shot from DB Team is here. It is Dynamic query so it is also not giving clue, what CSR has try to execute.

 

SELECT T_00."PARTNER", T_00."PARTNER_GUID" FROM "BUT000" T_00, ( SELECT * FROM ( VALUES CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ), CAST ( ? AS VARCHAR(30) ) ) AS T_01_TMP ( "C_01" ) GROUP BY "C_01" ) AS T_01 WHERE T_00."CLIENT" = ? AND T_00."PARTNER" = T_01.C_01 AND T_00."XDELE" <> ? WITH UR -- OPTLEVEL( 5 ) -- QUERY_DEGREE( 1 ) -- LOCATION( CL_BUPA_IL_SEARCH_SERVICE=====CP , 2510 ) -- SYSTEM( PC1 , SAPPC1 )

Display Factory/Holiday calendar in date field in WEB UI

$
0
0

The date picker on date field in Web UI is made using javascript on client side. Follow the following steps for factory/holiday calendar :

 

1. Make a custom handler class and implement IF_CRM_WEB_CALLBACK interface.

 

img1.PNG

 

2. IF_CRM_WEB_CALLBACK interface has only one method named HANDLE_REQUEST. This method is used to handle callback requests. For e.g. ajax    requests.

 

img2.PNG

Write the below code in HANDLE_REQUEST method.

 

       DATA: ls_holidays TYPE iscal_day,

          lt_holidays TYPE TABLE OF iscal_day,

          lv_date_from TYPE sy-datum,

          lv_date_to TYPE sy-datum,

          lv_days TYPE t009b-butag,

          lv_holidays_str TYPE string.

 

     lv_date_from = ir_server->request->get_form_field( 'date_from' ).

     lv_date_to = ir_server->request->get_form_field( 'date_to' ).

 

     CALL FUNCTION '/SDF/RBE_GET_DAYS_PER_MONTH'

       EXPORTING

         par_month = lv_date_to+4(2)

         par_year  = lv_date_to(4)

       IMPORTING

         par_days  = lv_days.

 

     CONCATENATE lv_date_to(4) lv_date_to+4(2) lv_days INTO lv_date_to.

 

     CALL FUNCTION 'HOLIDAY_GET'

       EXPORTING

         holiday_calendar           = 'IN'                       "" write your Holiday calendar ID, See tcode scal for reference

*       FACTORY_CALENDAR           = ' '                 "" write your factory calendar id if you want to reflect factory calendar in Web UI

         date_from                  = lv_date_from

         date_to                    = lv_date_to

       TABLES

         holidays                   = lt_holidays

       EXCEPTIONS

         factory_calendar_not_found = 1

         holiday_calendar_not_found = 2

         date_has_invalid_format    = 3

         date_inconsistency         = 4

         OTHERS                     = 5.

 

     IF sy-subrc = 0.

       LOOP AT lt_holidays INTO ls_holidays WHERE holiday = 'X'.

         CONCATENATE lv_holidays_str ',''' ls_holidays-date '''' INTO lv_holidays_str.

       ENDLOOP.

       CONCATENATE '[' lv_holidays_str ']' INTO lv_holidays_str.

     ENDIF.

 

     ir_server->response->set_cdata( lv_holidays_str ).

     ir_server->response->set_header_field( name  = 'content-type'

                                            value = 'text/xml' ).

 

 

The above code is used to get holidays between a certain period and send response in a string.

 

3. Write the below code on .htm page of your view or follow step 5.

 

<script>

function convertDate(lv_yr,lv_month,lv_day)

{

   var lv_date = ""+lv_day;

   if(lv_date.length == 1)

      lv_date = '0'+lv_date;

   var lv_month = ""+lv_month;

   if(lv_month.length == 1)

      lv_month = '0'+lv_month;

   var con = ""+lv_yr+lv_month+ lv_date;

   return con;

}

function getHolidays(pm,py,nm,ny)

{

    var lv_date_from = convertDate(py,pm,'01');

    var lv_date_to = convertDate(ny,nm,'31');

    var newSessionURL = new thtmlbCSessionURL();

    var sicfPath = "/webcuif/uif_callback";

   var handler = 'ZCL_WEB_REQUEST';                   /* write your custom handler class name */

    var url = newSessionURL.URL + sicfPath + "?crm_handler=" + handler + "&date_from=" + lv_date_from + "&date_to="

                  + lv_date_to + thtmlbBuildRequestTicketQuery();

    var form = document.getElementById("myFormId");

    var str = bindHtmlbEvent(form);

    var urlArray = url.split('?');

    ajaxObj = new AjaxRequest(urlArray[0] , {

                                                  method: 'post',

                                                  asynchronous: false,

                                                  parameters: urlArray[1],

                                                  bindingMode: 'xml',

                                                  onComplete: deltaRenderingCallback,

                                                  submittedFormId: form.id,

                                                });

 

       ajaxObj.executeRequest();

       var holiday_list = ajaxObj.request.responseText;

       return holiday_list;

}

thtmlbCalendar.makeDatePicker = function(sId,iYear,iMonth,iDay,iFirstDayOfWeek) {

     var oInput = thtmlbGetElement(sId);

     var arrTmp = thtmlb_txt[thtmlb_language];

     var date_content = '';

     var displayedDate = thtmlbGetElement(sId).value;

     if (displayedDate) {

       displayedDate = this.parseDate(displayedDate);

     }

     if (typeof(aMonthNames) == "undefined"){

       var aMonthNames = new Array ( arrTmp["THTMLB_JANUARY"],arrTmp["THTMLB_FEBRUARY"],arrTmp["THTMLB_MARCH"],

                                    arrTmp["THTMLB_APRIL"],arrTmp["THTMLB_MAY"],arrTmp["THTMLB_JUNE"],

                                    arrTmp["THTMLB_JULY"],arrTmp["THTMLB_AUGUST"],arrTmp["THTMLB_SEPTEMBER"],

                                    arrTmp["THTMLB_OCTOBER"],arrTmp["THTMLB_NOVEMBER"],arrTmp["THTMLB_DECEMBER"]

                                   );

     }

     if (typeof(aDayNameAbbrevs) == "undefined"){

       var aDayNameAbbrevs   = new Array ( arrTmp["THTMLB_SUNDAY_ABBREV"],arrTmp["THTMLB_MONDAY_ABBREV"],arrTmp["THTMLB_TUESDAY_ABBREV"],

                                          arrTmp["THTMLB_WEDNESDAY_ABBREV"],arrTmp["THTMLB_THURSDAY_ABBREV"],arrTmp["THTMLB_FRIDAY_ABBREV"],

                                          arrTmp["THTMLB_SATURDAY_ABBREV"]

                                         );

     }

     if (typeof(aDayCount) == "undefined"){ var aDayCount = this.dayCounts; }

     if (iYear == "" && displayedDate) { iYear = displayedDate.getFullYear(); }

     if (Number(iYear) < 1000) {  iYear  = String(Number(iYear)+2000);  }

     if (typeof(iFirstDayOfWeek)=="undefined") { iFirstDayOfWeek = thtmlb_system.firstdayofweek; }

     iLastDayOfWeek = iFirstDayOfWeek-1;

     if (iLastDayOfWeek==-1){ iLastDayOfWeek=6;  }

     var iMinimalDaysInFirstWeek=thtmlb_system.minimalDaysInFirstWeek;

     if (!iMinimalDaysInFirstWeek) { iMinimalDaysInFirstWeek=4;  }

     var firstOfMonth = new Date(iYear,iMonth,1);

     iYear  = firstOfMonth.getFullYear();

     iMonth = firstOfMonth.getMonth();

     this.updateFebruary(iMonth,iYear);

     var sCalHtml = '<table onclick="thtmlbCalendar.pick(event);" class="th-cal-pic-whl" cellpaddding="0" cellspacing="0" border="0"><tr>';

     var o = thtmlbGetElement(sId);

     var bRO = o.readOnly;

     var pm = iMonth-1; /*  Previous Month */

     var nm = iMonth+1; /*  Next Month */

     var dy = iDay;

     var py = iYear;    /*  Year associated to the Previous Month */

     var ny = iYear;    /*  Year associated to the Next Month */

     var pyd = 0;       /*  Year Delta associated to the Previous Month */

     var nyd = 0;       /*  Year Delta associated to the Next Month */

     if (pm==-1) {

       /*  Previous Month (is December) falls in the previous year. */

       pm = 11;

       py--;

       pyd = -1;

     }

     if (nm==12){

       /*  Next Month (is January) falls in the next year. */

       nm = 0;

       ny++;

       nyd = 1;

     }

     if (dy>28){

        dy=25;

     }

     var holidayList = getHolidays((pm+1),py,(nm+1),ny);

     sCalHtml    += "<td class=\"th-cal-arr-prev\" onclick=\"var cr = " + py + ";";

    sCalHtml    += "thtmlbCalendar.showDataPicker('"+sId+"', cr ,"+pm+","+dy+","+iFirstDayOfWeek+", false);\"";

     sCalHtml    += " title=\'" + oInput.getAttribute('PrevMonth') + "\'> </td>";

     sCalHtml    += '<td colspan="6" class="th-cal-hdr" nowrap="nowrap" align="center">'+ aMonthNames[iMonth];

     sCalHtml    += ' <input type="text" class="th-if" name="currentDate"';

     sCalHtml    += ' id="currentDate" value="' + iYear + '" size="4" maxlength="4"';

     sCalHtml    += " onkeydown=\"if(event.keyCode==13){blur(this);focus(this);}\"";  /* To evaluate the onchange. */

     sCalHtml    += " onchange=\"thtmlbCalendar.showDataPicker('"+sId+"',document.getElementById('currentDate').value,"+iMonth+","+iDay+","+iFirstDayOfWeek+", false);\"";

     sCalHtml    += "/></td>";

     sCalHtml    += "<td";

    if(iYear<9999){

      sCalHtml  += " class=\"th-cal-arr-next\" onclick=\"var cr = " + ny + ";";

     sCalHtml  += " thtmlbCalendar.showDataPicker('" + sId + "',cr," + nm+","+dy+","+iFirstDayOfWeek+", false);\"";

       sCalHtml  += " title=\'" + oInput.getAttribute('NextMonth') + "\'>";

     } else{

       sCalHtml  += ' class="th-cal-arr-next-dsbl">';

     }

     sCalHtml    += " ";

     sCalHtml    += "</td>";

     sCalHtml    += "</tr>";

     sCalHtml    += "<tr>";

     if (thtmlb_system.direction=="rtl") {

       sCalHtml    += '<td class="th-cal-name" style="border-left:0px none"> </td>';

     } else {

       sCalHtml    += '<td class="th-cal-name" style="border-right:0px none"> </td>';

     }

     for (var i=iFirstDayOfWeek;i<aDayNameAbbrevs.length;i++) {

       if (aDayNameAbbrevs.length>3) {

         aDayNameAbbrevs[i]=aDayNameAbbrevs[i].substring(0,3);

       }

       sCalHtml    += '<td class="th-cal-name">' + aDayNameAbbrevs[i] + '</td>';

     }

     for (var i=0;i<iFirstDayOfWeek;i++) {

       if (i==iLastDayOfWeek) {

         if (thtmlb_system.direction=="rtl") {

           sCalHtml    += '<td class="th-cal-name" style="border-left:0px none">' + aDayNameAbbrevs[i] + '</td>';

         } else {

           sCalHtml    += '<td class="th-cal-name" style="border-right:0px none">' + aDayNameAbbrevs[i] + '</td>';

         }

       } else {

         sCalHtml    += '<td class="th-cal-name">' + aDayNameAbbrevs[i] + '</td>';

       }

     }

     var numberOfDaysBeforeFirstOfMonth = firstOfMonth.getDay() - iFirstDayOfWeek;

     if (numberOfDaysBeforeFirstOfMonth <= 0) numberOfDaysBeforeFirstOfMonth += 7;

     var firstCalendarDay = new Date(firstOfMonth.getTime()-(numberOfDaysBeforeFirstOfMonth*24*60*60*1000));

 

     firstCalendarDay = new Date(firstCalendarDay.getTime()+(1000*60*60*12));

 

     var previousYearData = this.getYearData(iYear-1, iLastDayOfWeek, iMinimalDaysInFirstWeek);

     var currentYearData  = this.getYearData(iYear,   iLastDayOfWeek, iMinimalDaysInFirstWeek);

     var weeksInPreviousYear = previousYearData.maxWeekNum;

     var weeksInCurrentYear  = currentYearData.maxWeekNum;

     if (iMonth == 0) {

       if (firstCalendarDay.getDate() == currentYearData.firstDayOfFirstWeek.getDate()) {

         weekNum = 1;

       } else {

         weekNum = weeksInPreviousYear;

       }

     } else {

       weekNum = Math.floor(((firstCalendarDay.getTime() - currentYearData.firstDayOfFirstWeek.getTime())

                             / (7*24*60*60*1000)) + 1.5);

     }

 

     for (var i=0;i<6;i++) {

       if (iMonth==0 && weekNum>weeksInPreviousYear) {

         weekNum = 1;

       } else if (iMonth==11 && weekNum>weeksInCurrentYear) {

         weekNum = 1;

       }

       sCalHtml    += '<tr class="th-cal-row"';

       if (!bRO){

         sCalHtml    += ' style="cursor:pointer;"';

       }

       sCalHtml    += '><th class="th-cal-name" style="border-style:none' + ((i<5)?" none solid none":"")+' !important;">' +

                     ((weekNum>0)?weekNum:" ")+'</th>';

       /* Looping through the days: */

       for (var n=0;n<7;n++) {

         var sClass="";

         sId=firstCalendarDay.getFullYear()+"-"+(firstCalendarDay.getMonth()+1)+"-"+firstCalendarDay.getDate();

         if (firstCalendarDay.getMonth()!=iMonth) {

           sClass="th-cal-ina";

         } else {

           sClass="";

         }

         if (displayedDate.getDate) {

           if (( firstCalendarDay.getFullYear() == displayedDate.getFullYear() ) &&

              ( firstCalendarDay.getMonth()    == displayedDate.getMonth()    ) &&

              ( firstCalendarDay.getDate()     == displayedDate.getDate()     )) {

             sClass += (sClass) ? " th-cal-selected" : "th-cal-selected";

           }

         }

         sCalHtml+="<td";

         if (n==0) {

           if (thtmlb_system.direction=="rtl"){

             sCalHtml+=' style="border-right-style:solid"';

           } else {

             sCalHtml+=' style="border-left-style:solid"';

           }

         }

         date_content = firstCalendarDay.getDate();

 

         var holidclass = '';

         var con_date = convertDate(firstCalendarDay.getFullYear(),(firstCalendarDay.getMonth()+1),firstCalendarDay.getDate());

         if(holidayList.indexOf(con_date)!=-1)

         {    holidclass = "th-cal-holid";}

 

         if (((firstCalendarDay.getYear()==new Date().getYear()) && (firstCalendarDay.getMonth()==new Date().getMonth())

             && (firstCalendarDay.getDate()==new Date().getDate())) || holidclass != '' ){

             date_content = '<div class="th-cal-tod ' + holidclass +'">' + date_content + '</div>';

         }

 

         if (sClass!="") {

           sCalHtml+=' id="' + sId + '" class="th-cal-row-td ' + sClass + '">' + date_content + '</td>';

         } else {

           sCalHtml+=' id="' + sId + '" class="th-cal-row-td">' + date_content + '</td>';

         }

 

     var firstCalendarDayfirstHour = firstCalendarDay;

     var firstCalendarDayAtNoon;

 

     if (firstCalendarDayfirstHour.getHours()<=1) {

         firstCalendarDayAtNoon = new Date(firstCalendarDayfirstHour.getTime()+(1000*60*60*12));

     }

     else {

         firstCalendarDayAtNoon = firstCalendarDayfirstHour;

     }

     firstCalendarDay = new Date(firstCalendarDayAtNoon.getTime()+(1000*60*60*24));

 

       }

       /* Next week! */

       weekNum++;

       if ((firstCalendarDay.getDay()==iFirstDayOfWeek)&&(firstCalendarDay.getMonth()>iMonth)) {}

       sCalHtml    += '</tr>';

     }

     sCalHtml    += '</table>';

     return sCalHtml;

}

</script>

 

The above code is used to send an ajax request to the custom handler class to get holiday list and then prepare design for the calendar.

getHolidays() function is used to send an ajax request and get response, thtmlbCalendar.makeDatePicker() function is used for the design of calendar.

 

Step 4 . Write below style element on htm page for holiday date ui.

 

<style>

.th-cal-holid

{

   background-color: LightSalmon;

}

</style>

 

Step 5. If you want to avoid writing code of step 3 on .htm page, then

 

a. create a js file

b. copy step 3 code into that js file

c. upload that file into your component through tcode se80->MIME repository.

   In Mime repository follow SAP->BC->BSP->ZAUTO->Import Mime Objects.   (ZAUTO is the component name in which your date field is present)

d. Write the below line on .htm page of your view to include the js file you just uploaded.


<script type="text/javascript" src="/sap/bc/bsp/sap/zauto/myCalendar.js"></script>     

 

zauto is the component name and myCalendar.js is the js file name.

 

img4.PNG

 

img5.png

 

img6.PNG

 

You just need to change the holiday calendar id in step 2 and custom handler class name in step 3.

 

Now you will be able to see all holidays marked as red in web ui.

 

img3.PNG

 

Thanks and Regards,

Ritu

Genil object difference

$
0
0

Hi,

 

A) what is the main difference between these genil objects

 

1. Query Object

2. Query Result Object

 

B) Can we create search view for 1. Query Object?

Any step by step process available to create search views for above objects?

Viewing all 4552 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>