Wednesday, February 29, 2012

BP Transaction Code

1)To update the details of PERNR from PA30 to BP, we need to run a program from SE38 HRALXSYNC
2)BAPI_BUPA_GET_EMPLOYEE_FROM_BP       "FM   to get PERNR.

Implement BAdI


Thursday, February 23, 2012

ContextMapping

Two types of mapping Internal and External mapping:

A) Internal mapping:

1)Goto SE80.
2)create WD component.( ex: zinternalmap )
3)Create a NODE(ex: subjects) in Component controller .
4)Create two views view1 and view2.
5)Drag and Drop the NODE in the context tab of the view1 and view 2 from the context Component controller.
6)In view1 create group, right-click on it for Create Form container. Select the context, give the node and Standard Cell Editor: Inputfied. And also create a button (ex: Enter) and ViewContainerUIElement.
7)In view2 create group, right-click on it for Create Form container. Select the context, give the node and Standard Cell Editor: TextView.
8)In window you will find the ViewContainerUIElement, right-click on it. Embed view (view2).
9)Create a web dynpro application and right-click hit "TEST".
10)Give the details and press button.. You can display the values.

B)External mapping:
There are two type of external mapping 
i) Direct Mapping. 
ii)Reverse Mapping.


i) Direct Mapping:


1)Goto SE80.

2)create WD component.( ex: zexternal_struct )
3)Create a NODE(ex: subjects) in Component controller  and check the option "Interface Node". After that we can see the node image and save and active it.



5)Create WD component.( ex: zexternal_assign )
6)Double click on the Web Dynpro Component which you have created. In the used components tab add the zexternal_struct in component column.
7) Click on the COMPONENTCONTROLLER, hit controller usage. check the created zexternal_struct here.Now you can drag and drop into context Component controller.
***NOTE: same steps which we created in internal mapping***
8)Create two views view1 and view2.
9)Drag and Drop the NODE in the context tab of the view1 and view 2 from the context Component controller.
10)In view1 create group, right-click on it for Create Form container. Select the context, give the node and Standard Cell Editor: Inputfied. And also create a button (ex: Enter) and ViewContainerUIElement.
11)In view2 create group, right-click on it for Create Form container. Select the context, give the node and Standard Cell Editor: TextView.
12)In window you will find the ViewContainerUIElement, right-click on it. Embed view (view2).
13)Create a web dynpro application and right-click hit "TEST".
14)Give the details and press button.. You can display the values.


ii)Reverse Mapping:

Note: we use the above example upto 12 point and in the 3 point of direct mapping(3)check also Input Element (Ext.) also. 

15)In the zexternal_struct Double click on the Web Dynpro Component which you have created. In the used components tab add the zexternal_assign in component column.
16)In this we don't have any views.
17)Just goto window,, right-click on Embedded View. you can find the window of the  zexternal_assign.
18)And in option Embedded Interface View: give the view name(view1).
19)Create a web dynpro application and right-click hit "TEST".
20)Give the details and press button.. You can display the values.



Monday, February 20, 2012

SO10 TEXT TRANSPORT

CREATE SO10 TEXT.





GO TO SE09






















GO TO SE38














PRESS ENTER






GO TO OTHER CLIENT (EXAMPLE 101)












save_text sample program



Create a text in SO10 tcode.


REPORT  ZDEMO_SAVESO10.

data : lt_head type TABLE OF THEAD,
       lS_head type  THEAD,
       IT_TLINES type table of TLINE,
       Is_TLINES type TLINE,
       LV_CHAR(132) TYPE C.

*   Text object
    lS_head-tdobject = 'TEXT'.
*   Standard text name
    lS_head-tdname = 'ZDEMO_SAVETEXT'.
*   Text id
    lS_head-tdid = 'ST'.
*   Language
    lS_head-tdspras = 'E'.


    LV_CHAR = 'Sample text placed in the SO10'.
    Is_TLINES-TDFORMAT = '*'.
    Is_TLINES-TDLINE = LV_CHAR.
    APPEND  Is_TLINES TO IT_TLINES.

*  Populate the standard text with table data
    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
        header                = lS_head
        insert                = 'X'
        savemode_direct       = 'X'
      TABLES
        lines                 = IT_TLINES
     EXCEPTIONS
       id                    = 1
       language              = 2
       name                  = 3
       object                = 4
       OTHERS                = 5
              .
    IF sy-subrc <> 0.
    ENDIF.


*******Example for reading a text from SO10.
*Link to get in deatil. READ_TEXT
*******
    refresh IT_TLINES.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
*       CLIENT                        = SY-MANDT
        ID                            =  'ST'
        LANGUAGE                      =  'E'
        NAME                          =  'ZDEMO_SAVETEXT'
        OBJECT                        =  'TEXT'
*       ARCHIVE_HANDLE                = 0
*       LOCAL_CAT                     = ' '
*     IMPORTING
*       HEADER                        =
      TABLES
        LINES                         =  IT_TLINES
*     EXCEPTIONS
*       ID                            = 1
*       LANGUAGE                      = 2
*       NAME                          = 3
*       NOT_FOUND                     = 4
*       OBJECT                        = 5
*       REFERENCE_CHECK               = 6
*       WRONG_ACCESS_TO_ARCHIVE       = 7
*       OTHERS                        = 8
              .
    IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    read table IT_TLINES into Is_TLINES index 1.
    write Is_TLINES-TDLINE.


Wednesday, February 15, 2012

PARAMETERHIDE


REPORT  ZDEMO_PARAMETERHIDE.

SELECTION-SCREEN : BEGIN OF BLOCK meth WITH FRAME TITLE text-001.
PARAMETERS:   sample AS CHECKBOX USER-COMMAND fcode1,
              hidden TYPE string default 'Hidden Filed' MODIF ID id1.
SELECTION-SCREEN : END OF BLOCK meth.

SET PF-STATUS 'STATUS'.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF  sample <> 'X' AND screen-group1 = 'ID1'.
      screen-active = '0'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.


Execute the program.