Tuesday, March 10, 2020

How to create QR code IN SAP ABAP.


QR Code create in SAP ABAP step by step.


QR Code create in step by step.

GO TO:T- CODE SE73
Create QR Code
























Create style for QR Code
GO To T-CODE:-Smartstyles
Create Style for QR Code



Declare QR code in smartforms

Go To T-CODE:- smartforms


 





Monday, March 9, 2020

BAPI BAPI_GOODSMVT_CREATE Program Example IN SAP ABAP.


BAPI BAPI_GOODSMVT_CREATE Program Example.




BAPI BAPI_GOODSMVT_CREATE  Create Example.

* Declare Structures for BAPI
  data: gm_header1  type bapi2017_gm_head_01,
        gm_code1    type bapi2017_gm_code,
        gm_headret1 type bapi2017_gm_head_ret,
        gm_item1    type table of bapi2017_gm_item_create with header line.
  data: gm_return1  type bapiret2 occurs 0.
  data: gm_retmtd1  type bapi2017_gm_head_ret-mat_doc.

  clear: gm_return1, gm_retmtd1. refresh gm_return1.


*Declare BAPI header data.
  gm_header1-pstng_date = sy-datum.
  gm_header1-doc_date   = sy-datum.
  gm_code1-gm_code      = '06'.                              " MB11

*  551 movement type to table
  clear gm_item.
  move:  '551'        to gm_item1-move_type ,
         '000000000040001234' to gm_item1-material,
         '2'        to gm_item1-entry_qnt,
         'EA'       to gm_item1-entry_uom,
         '0006'     to gm_item1-plant,
         '4010'     to gm_item1-stge_loc,
         '202'      to gm_item1-move_reas.

* Determine cost center per plant
  case xresb-werks.
    when '0011'.
      move '0000041431' to gm_item1-costcenter.
    when '0012'.
      move '0000041631' to gm_item1-costcenter.
    when '0013'.
      move '0000041734' to gm_item1-costcenter.
    when '0014'.
      move '0000041836' to gm_item1-costcenter.
  endcase.

  append gm_item1.

* Call goods movement BAPI
  call function 'BAPI_GOODSMVT_CREATE'
       exporting
            goodsmvt_header  = gm_header1
            goodsmvt_code    = gm_code1
       importing
            goodsmvt_headret = gm_headret1
            materialdocument = gm_retmtd1
       tables
            goodsmvt_item    = gm_item1
            return           = gm_return1.


   call function 'BAPI_TRANSACTION_COMMIT'
       exporting
            wait = 'X'.

Monday, March 2, 2020

OData related question in SAP ABAP.

OData related question  in SAP ABAP.


OData question below details.

1.What is OData? Explain the advantages of OData?
2.What is the transaction code for creating OData project?
3.Explain the folders in OData project?
4.Which OData version do you use?
5.What is Entity type and Entityset? What is the difference betweenthem?
6.Explain complex type?
7.Mention difference between Entity type and Complex type?
8.What is Function import? When should we opt for function import?
9.What is Association and Association set?
10.What is referential constraint? Is it mandatory to create referentialconstraints?
11.What is navigation property? What is its use?
12.What are the classes created by framework when runtime artifacts aregenerated?
13.What are MPC, MPC Extension class & DPC, DPC Extension class?
14.What is Metadata? How to download Metadata?
15.What is the default format for data in Http response body?
16.Can we query or retrieve metadata in JSON format?
17.What will happen if logic is implemented in Model provider class &Data provider class and regenerate the runtime objects?
18.What is with Mapping and without mapping for BAPI & RFC in OData?
19.What are CRUD methods?
20.What is the difference between GET_ENTITY & GET_ENTITYSET?
21.Mention different status codes you have came across in OData?
22.What are the status codes for Create, Update, Delete and Getoperations?
23.Will the data return to HTTP Response body, if ER_ENTITY ofUPDATE_ENTITY is populated with value?
24.How to make configuration for calling a service in a system?
25.List some query options in OData?
26.What are skip & top query?
27.What is the query for Function Import?
28.In which method do you implement logic for function import?
29.What are the parameters of EXECUTE_ACTION method?
30.How to pass the GUID value in the Query?

Wednesday, February 26, 2020

AL11 ,CG3Y, CG3Z, CACS_FILE_COPY, download and copy and delete file application server in SAP .


SAP ABAP  AL11 ,CG3Y, CG3Z, CACS_FILE_COPY  details.

AL11 ,CG3Y, CG3Z, CACS_FILE_COPY  details.
AL11 T-Code meanly used for the controlling to store file in the application server. All the file directories you can see in the AL11 .This step can be done in AL11 transaction for uploading, downloading and deleting files.
Below are details step you can see.
Uploading a file in Al11 Directory in SAP.
Step 1: Located the file location in which we have to upload the file.

 

Step 2: Next->GO to-> CG3Z this is for uploading the file in AL11 directory.

Step 3: Write you’re the source location for file from the front end system and the target file location in the AL11 directory. Next you click Upload Button.


·         When you transfer your file this Transfer file format for Data ( by default, it is set to BIN for Binary)
·         If you want overwrite file check this checkbox.

·         This is the below message will be display.

Now directory will contain the uploaded file.

You can see text file will be uploaded.


Next step is downloading a file from AL11 directory in SAP.
Step 1: At first you select your file which you want to download in your local system.

Step 2: Next ->>GO TO->> CG3Y.


Step 3: You write your source location and the target location where you can store your file after you click on download button.


When you’re downloaded successfully you can get below message.



Next step is deleting a file in AL11 directory in SAP.
Step 1: Go to àSE37, after enter Function module name EPS_DELETE_FILE after click on the execute button.



Step 2: Next ->put your file name and file path-> FILE_NAME and the directory path in the DIR_NAME and execute.

 

After you get  deleted successfully message.



SAP Copy File with CACS_FILE_COPY in SAP.
This T-Code CACS_FILE_COPY is very helpful also.
If you want to copy File Application to Presentation Server and Presentation to Application. This time you can use This T-Code CACS_FILE_COPY SAP Standard.






First you set your Copy direction
·         Application To Presentation Server
·         Presentation Server to Application
And set your file source and file destination details.


SAP ABAP enhancement interview question.



List of ABAP enhancement  interview question.


ABAP enhancement question.


1.       What is enhancement and how many types are there?
2.      What is implicit enhancement?
3.      How explicit enhancement differs from implicit?
4.      What are user-exits? If you have worked state an example.
5.      What is customer exit and how it affects standard program?
6.      Difference between enhancement-point and enhancement-section?
7.      Do you use commit after code in enhancement-point? If yes where have you used it? (Note : never use commit in enhancements , you can but it's not a good practice as the enhancement can be called via other programs as well)
8.     Why do we implement badi?
9.      What is the use of badi? and what makes it a reliable method?
10.  What is filtered badi?
11.   How do you find a badi? Tell me two -three ways?
12.  What are adapter classes?
13.  How the methods of badi gets executed?
14.  What interface are there in badi by default?
15.   What is BET in enhancement?