Wednesday, June 23, 2021

Adobe Forms Tips and Tricks - From SCN Members

 


Source:  https://blogs.sap.com/2017/09/27/sap-adobe-form-tips-and-tricks/

This blog is about tips and tricks and not about describing how something works.

1st tip is to have some calming substance nearby – you will need it. 🙂 (Something your country and company policy allows of course…)

2nd tip – Adobe form has serious caching issues. Anything you do might or might not be saved and activated. Keep this in mind during testing. If something doesn’t work but it should that is possibly not your fault – caching got you. Some caching problems can be negated by using FM IQS1_REFRESH_ALL. This FM will delete some of the cache Adobe Form is using but not all!!! So if something still doesn’t work that can be still a caching issue. You can try to make a big change to the form, interface, and activate them again. This is the last thing I can recommend if that doesn’t work then you can ask basis to restart the server. 🙁

3rd tip – Adobe form links data to the individual elements in a very time-consuming way. And this link can be easily wiped during repositioning of the elements. So during repositioning be very careful what you are doing. Perform all logic in the interface before you call the form. Put your data into nicely named fields/structures/tables. Never count on the link. The link might be there or not. Don’t use the import structures/tables. Copy your data instead to global data and link those. If the link is gone you can relink the whole thing a lot more easily.

4th tip – Adobe form performs checks on the context data. These checks are not performed on the import data. SAP has set up a few import data structures that will immediately break the Adobe form if they are moved to the context data. Break means short dump. If you experiencing a short dump during development this might be the reason. Your global structures need to be correct. For example, unit and currency field dependencies cannot point outside of the structure.

5th tip – Translation works. Sometimes it doesn’t – because translation is cached too. If the translation doesn’t work you can run a program that wipes the template cache. The program is FP_PDF_TEST_26. You can disable template cache to avoid the problem altogether see OSS note 2258036.

If you have more tips and tricks leave a comment. I check and put them into the post.


User Comment

Thanks for the tip with the translation cache. I experienced this error tons of times. My solution so far was to do a dummy change on the layout, add the translation to the transport manually and import the TA. Your solution seems more comfortable

Wednesday, February 7, 2018

Webdynpro Run Time Analysis - SAT / SE30



I.  How to create a performance trace for a Web Dynpro Application:
1.     Please create a new variant in transaction SE30 (WEBDYNPRO for example).
2.     Go to the corresponding service of your application in SICF and start the performance analysis (Edit menu → Runtime analysis → Activate): select variant (WEBDYNPRO), choose "High" for the measurement precision and "Single entries" for the processing.
3.     Start application and recreate the steps where the performance problem facing.
4.     Deactivate the performance analysis (Edit menu → Runtime analysis → Deactivate)

II.  To evaluate the trace within transaction SE30 or SAT:
1.     Go to the tab 'Evaluate'.
2.     Select from the table the measurement with the highest 'runtime' value 3.  Double-click it
4.     Go to tab 'Hit list'
5.     Sort in decreasing order the results by 'Net (microsec)' time
6.     The Statements/events in the top rows would take up the most time by the application.


Reference :
https://launchpad.support.sap.com/#/notes/2327539

Monday, September 25, 2017

How to run Webdynpro directly to SAP GUI?



1. Create t-code through SE93 with below configuration,  choose Transaction with parameters


2. Assign transaction WDYID, Skip Intial Screen .

3. Put below parameters in Screen Field Value

Name of Screen Field        Value

APPLICATION              ZWD_APP_NAME
STARTMODE                GUI

Thursday, September 7, 2017

How to Read Class or Object with Multiple Reference ??

 
 
 
 
 
  1. We need to read the ZCX_EXCEPTION reference in the code.
  2. zcx_exception TYPE REF TO lcx_exception.
  3. DATAexc    TYPE REF TO cx_root,
  4. CATCH lcx_exception INTO zcx_exception.
    exc ?=  zcx_exception" Take CX_ROOT INSTANCE
  5. Above is the way to read CX_ROOT value in the ZCX_EXCEPTION to EXC reference.
  6.  textid exc-textid.
  7. zcx_exception-text . Reading local class value.
 
 
 

Monday, September 4, 2017

Upload to AL 11 through Webdynpro




method onactionupload2 .

  data lo_el_context type ref to if_wd_context_element.
  data ls_context type wd_this->element_context.
  data lv_zraw type wd_this->element_context-zraw.

*   get element via lead selection
  lo_el_context wd_context->get_element).
*   @TODO handle not set lead selection
  if lo_el_context is initial.
  endif.

*   get single attribute
  lo_el_context->get_attribute(
    exporting
      name =  `ZRAW`
    importing
      value lv_zraw ).

  data :
    l_fname   type string ,
    lv_x      type x,
    lv_string type string.
  lv_x lv_zraw.
  l_fname '/ECD/RAHSIAXSTRING2.PGP'.

  datalit_binary_content type solix_tab.

  call function 'SCMS_XSTRING_TO_BINARY'
    exporting
      buffer     lv_zraw
*     APPEND_TO_TABLE       = ' '
* IMPORTING
*     OUTPUT_LENGTH         =
    tables
      binary_tab lit_binary_content.

  .

  open dataset l_fname for output in binary mode .

  loop at lit_binary_content assigning field-symbol().
    transfer -line to l_fname.
  endloop.

  close dataset l_fname.


endmethod.
 

Sunday, March 19, 2017

Assign anyr eference type of data to specific attributes



"To assign any data type reference  to specific val





DATA lt_tarikh TYPE zwdselopt.
DATA ls_tarikh TYPE selopt.
FIELD-SYMBOLS:    TYPE INDEX TABLE,
                    TYPE              any,
                  TYPE              char1,
               
                   TYPE              any,
                  TYPE              any.
DATA lt_datum TYPE REF TO data.
ASSIGN lt_datum->* TO .

IF IS ASSIGNED.
  LOOP AT ASSIGNING .
    ASSIGN COMPONENT 'SIGN' OF STRUCTURE TO .
    ASSIGN COMPONENT 'OPTION' OF STRUCTURE TO
    ASSIGN COMPONENT 'LOW' OF STRUCTURE TO .
    ASSIGN COMPONENT 'HIGH' OF STRUCTURE TO .
    ls_tarikh-sign = .
    ls_tarikh-option =
    ls_tarikh-low = .
    ls_tarikh-high = .
    APPEND ls_tarikh TO lt_tarikh.
  ENDLOOP.
ENDIF.