Posts

Showing posts from April, 2018

Message Display Function to show your messages

         CALL  FUNCTION  'MESSAGES_INITIALIZE' .  "clear the buffer messages          CALL  FUNCTION  'MESSAGE_STORE'             "add your message            EXPORTING             arbgb  =  'ZO2CUS'             msgty  =  'E'             txtnr  =  001 .          CALL  FUNCTION  'MESSAGES_SHOW' .

VOFM ROUTINE

How to Call BDC within Function Module

Some time Requirement to call BDC within Function Module here i going to explain how to call BDC within function module and also put some code you you get little idea how to call bdc within function Module 1. you have to pass all import parameter 2. in function module all include pass to top include  here come to point and how code look like below after this program you able to call any bdc within function module i have created this function Module to only calling odata services

Parallel cursor Methods

1      Parallel Cursor  is a technique to increase the performance of the program when there are nested loops      DATA :  gt_vbak  TYPE  STANDARD  TABLE  OF  vbak ,         gt_vbap  TYPE  STANDARD  TABLE  OF  vbap ,         lv_tabix  TYPE  sy - tabix . FIELD-SYMBOLS :   <fs_vbak>  TYPE  vbak ,                 <fs_vbap>  TYPE  vbap .          SELECT  *  FROM  vbak  INTO  TABLE  gt_vbak  UP  TO  1000  ROWS .          SELECT  *  FROM  vbap  INTO  TABLE  gt_vbap  UP  TO  10000  ROWS .            SORT  gt_vbak  BY  vbeln .            SORT  gt_vbap  BY  vbeln posnr .           LOOP  AT  gt_vbak  ASSIGNING  <fs_vbak> .             IF  sy - subrc  EQ  0 .            READ  TABLE  gt_vbap  TRANSPORTING  NO  FIELDS   WITH  KEY  vbeln  =  <fs_vbak> - vbeln .              IF  sy - subrc  EQ  0 .            lv_tabix  =  sy - tabix .            LOOP  AT  gt_vbap  FROM  lv_tabix  ASSIGNING   <fs_vbap> .              IF  sy - subrc  EQ 

Select single records behalf of condition

some time we get this type requirement to select single records behalf of condition so this code help to to write logic to select single records behalf of  condition below code help to to show fetch URL TO database and display in export parameter   FUNCTION  zbanner_fm . *"---------------------------------------------------------------------- *"*"Local Interface: *"  EXPORTING *"     VALUE(EX_BANNER_1_1) TYPE  /SAPSMOSS/URL *"     VALUE(EX_BANNER_1_2) TYPE  /SAPSMOSS/URL *"     VALUE(EX_BANNER_1_3) TYPE  /SAPSMOSS/URL *"     VALUE(EX_BANNER_2_0) TYPE  /SAPSMOSS/URL *"----------------------------------------------------------------------    DATA  :  gt_zbanner_home  TYPE  STANDARD  TABLE  OF  zbanner_home ,          gs_zbanner_home  TYPE                   zbanner_home ,          lv_max           TYPE                              i . * change by Rohini kumar date 4/08/2018    SELECT  MAX (  seq_no  )  FROM  zbanner_home  IN

Paylode for Sales Order Creation ODATA

Pay lode for creation of deep insert some time to get difficult creation of pay lode {         "OrderId": "4010000709",         "DocumentType": "ZKOR",         "DocumentDate": "/Date(1524096000000)/",         "CustomerId": "0002100001",         "SalesOrg": "2100",         "DistChannel": "10",         "Division": "10",         "OrderValue": "31.20",         "Currency": "USD",         "INCOTERMS": "FOB",         "SOLD_TO_PARTY": "0002100001",         "SHIP_TO_PARTY": "0002100001",         "PURCH_NO_C": "ROHINIKUMAR",         "REQ_DEL_DATE": "/Date(1524096000000)/",         "SOItems": {             "results": [                 {                     "OrderId": &qu