Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

ABAP Quick Search for NWBC

$
0
0

In the SAP (Netweaver) Business Client you have a search bar in the upper range of the window. As soon as you type something in there, it tries to get search suggestions from all the defined so-calledsearch providers:

Context.png

It is possible to add own search providers. For more information, see: WKS: How to use NWBC in TM - Search Providers

 

The ABAP Quick Search for NWBC is such a search provider.

With that search you can easily search for all ABAP related content available on your system and open it with one click:

Example.png

 

Additional Features:

  • Results are sorted by type
  • Define a namespace and search it by typing //
  • Extra fancy result page

resultpage.PNG

  • Search for special result types by typing \<object_type> (see file ABAP_Whitelist.xlsx or the list at the end of the document)
  • Decide how to open tables: Do you want to see the structure (SE11) or the content (SE16)?

Tables.png

  • Decide how to open BOBF Business Objects: In the BOBF Test UI or in BOBF Conf UI?

OpenBOBF.png

 

If you want to have the search included into your Business Client, please read this scn posting: How to include ABAP Quick Search into NWBC

 

Here is the standard list of result types for which is searched for. In case you want to search for a certain type, add \<object_type> to your search request.

E.g. "\CLAS" for classes.

 

ACIDCheckpoint Group
IWPRGW Service Builder Project
SAMCABAP Messaging Channel
SAPCABAP Push Channel
SPRXGeneric Proxy
BOBFBOPF Business Object
BOBXBOPF Enhancement Object
CLASClass
COBOBudiness Object
DEVCPackage
DOMAMain
DTELData Element
ENQULock Objects
FUGRFunction Group
FUGSFunction Groups
IAMLLanguage Dependent MIME Object
IAMUMIME Objects
IASPInternet Service
INTFinterface
MSAGMessage Classes
PARAUser Parameter
PINFPackage Interface
PROGInclude
RPDFReport Definition
SCATTest Case
SCGRService Group
SFBFBusiness Function
SFPFForm
SFPIInterface
SHLPSearch Help
SHMAShared Object Area Class
SMIMMime Objects
TABLDictionary
TRANTransactions
TTYPDictionary
TYPEDictionary
VIEWView
WDCAWeb Dynpro Application Configuration
WDCCWeb Dynpro Component Configuration
WDCPWeb Dynpro Chip
WDYAWeb Dynpro Application
WDYNWeb Dynpro Comp/INTF

coep table issue in KSB1 report

$
0
0

Hi All,

 

I am developing a report based on tcode KSB1 . for that i am using COBK and COEP tables .but COEP table is having all the summarized and detailed data .

 

i need to fetch only detailed data . could you please explain logic to fetch only detailed data not summarized?

 

 

 

 

Regards,

 

Vinod N.

Posting JV with deducted withholding tax using BAPI_ACC_DOCUMENT_POST

$
0
0

Hi Experts,

 

I am posting the JV using BAPI_ACC_DOCUMENT_POST in which the withholding tax should be deducted also.

 

I am passing following parameters in  bapiacwt09 table while posting:

  1. itemno_acc
  2. wt_type
  3. wt_code
  4. bas_amt_tc

 

But the tax is not being deducted.

 

Also one extra record in withholding data is being added.

Please suggest me the way to resolve the issue so that the tax should be automatically calculated.

 

In my case only Withholding Tax should be deducted not any other tax.

 

Thanks in advance.

Sanjeev Kumar

Alphanumeric value in TOA01

$
0
0

Hallo Experts,

 

 

I have some problem to search data from T0A01. In toao1 table document save with tvCLIsITI}6MF00QP9b4U0 alphanumeric.

Now i want data read from table .

 

e.g

 

im_object = tuNvEFccXKl6h2W0QP9b4S0.

 

when i give value this automatically in upper case come. but in toa01 table save with this value tvCLIsITI}6MF00QP9b4U0.


im_obejct = UNVEFCCXKL6H2W0QP9B4S0

 

 

SELECT SINGLE * FROM TOA01 INTO ls_toa01

WHERE object_id = im_object. ( UNVEFCCXKL6H2W0QP9B4S0 )

 

not search value .

 

How can possible value does not change in upper case .  value remain in alphanumeric value

 

SELECT SINGLE * FROM TOA01 INTO ls_toa01

WHERE object_id = im_object. ( tuNvEFccXKl6h2W0QP9b4S0 )

Alphanumeric value in TOA01

$
0
0

Hallo Experts,

 

 

I have some problem to search data from T0A01. In toao1 table document save with tvCLIsITI}6MF00QP9b4U0 alphanumeric.

Now i want data read from table .

 

e.g

 

im_object = tuNvEFccXKl6h2W0QP9b4S0.

 

when i give value this automatically in upper case come. but in toa01 table save with this valuetvCLIsITI}6MF00QP9b4U0.


im_obejct = UNVEFCCXKL6H2W0QP9B4S0

 

 

SELECT SINGLE * FROM TOA01 INTO ls_toa01

WHERE object_id = im_object. ( UNVEFCCXKL6H2W0QP9B4S0 )

 

not search value .

 

How can possible value does not change in upper case .  value remain in alphanumeric value ?

 

SELECT SINGLE * FROM TOA01 INTO ls_toa01

WHERE object_id = im_object. ( tuNvEFccXKl6h2W0QP9b4S0 )

BAPI_ACC_DOCUMENT_POST tax calutaion with COPA Fields

$
0
0

Hi Experts,

 

I know there are lot of already discussion regarding this topic but i am unable to solve my problem even after referring all those posts.

 

My requirement is to post doc with tax calculation and also update COPA fields using this BAPI. I m using FM COPA_PROFITABILITY_SEGMENT which generates profit seg. number and passing this number to extension 1 table of BAPI.

 

tables are filled as below.

 

ACCOUNTGL

 

ITEMNO_ACC0000000002
GL_ACCOUNT44000000
ITEM_TEXTBAPI Test G/L lin
COMP_CODEABCD
TAX_CODEEX
COSTCENTERHZZ000MK00

 

ACCOUNTPAYABALE

 

ITEMNO_ACC0000000001
VENDOR_NOZXCV1
BLINE_DATE04.11.2015
ITEM_TEXTBAPI Test A/P line item

 

CURRENCYAMOUNT

 

ITEMNO_ACC0000000001
CURR_TYPE00
CURRENCYINR
AMT_DOCCUR10,000.0000-
ITEMNO_ACC0000000002
CURR_TYPE      00
CURRENCY        INR
AMT_DOCCUR9,090.9100
ITEMNO_ACC0000000003
CURR_TYPE00
CURRENCYINR
AMT_DOCCUR909.0900
AMT_BASE9,090.9100

 

ACCOUNTTAX

 

ITEMNO_ACC0000000003
GL_ACCOUNT24011014
COND_KEYJSVR
ACCT_KEYZSE
TAX_CODEEX

 

EXTENSION1

 

FILED10000000001
FILED2
FILED3 400000011166
FILED4000000
FILED10000000002
FILED2
FILED3 31
FILED4000000

 

I am getting error message 'F5 846 Debit/credit indicator is inconsistent'. If i remove extension 1 table then document posted successfully with tax calculation. Here  '0000011166' is profitability segment number which i m passing with posting key 40. Also with same data if i skip tax calculation and change currency table accordingly then this profit seg number updating successfully in doc. using same extension 1 table.

 

Please guide how to fill these tables.

How i can check whether Java Application is called or not from ABAP system

$
0
0

We are using CL_GUI_FRONTEND_SERVICES=>EXECUTE method..

 

We are calling JAR JAVA file from ABAP.

 

But we are not sure whether it is calling .JAR file or not.

 

Please suggest what to provide in importing parameters of class method Execute..( Default Directory and  parameter  ?)

 

JAVA Program accepts 1 parameter (Type String) as argument.

Capture.JPG

How can I ensure that JAVA report is getting called from ABAP and Where I can see it's output ?

 

Regards,

Gaurav

Editable cell in ALV (REUSE_ALV_GRID_DISPLAY)

$
0
0

Hi,

 

I have a request to create a new column in an ALV program that already exists. The new column should  be editable only when the value of the cell  is zero - so the control must be in each cell, not in the entire column.

 

It is not an OO program - the ALV is using the fm "REUSE_ALV_GRID_DISPLAY".

 

Is it possible?   I would appreciate any help.

 

obs: SAP version 4.7

 

Thanks in advance.

Joao Gaia


Launch standard program in background

$
0
0

Hi experts,

 

I would like to launch the standard program in ECC transaction OLIZBW in background.

I have to launch it as many times as the number of compagnies existing.

 

After some searchs, the program related to this transaction is RMCBNERP.

I still didn't figure out in which table this t-code is taking the compagnies codes.

 

In the match code, i have around 200 compagnies. So i have to launch it 200 times. Is there anyway to automate this action trough an abap program?

 

Thanks.

 

Amine

Uploading logo in good quality in SE78

$
0
0

Hello guys,

 

first: YES, I know there are lots of threads with hints that handle the problem when uploading logos in SE78. I tried them all but none of them gives me a logo in good quality. So I search for alternatives:

 

My reason for which I need logo is adobe forms, which need for different company codes different logos. So I canot put just one graphic in the form, I need to differentiate with some custom Z table. So I use SE78 for uploading graphic.

 

Obviously there are only two possiblities, uploading as TIF or as BMP. Every TIF file that I upload will make my background from white to grey, and I did not find any solution to change that. When I upload as 256 color BMP the background is white, but the quality is terrible. The perfect clear source file is really bad quality after uploading it in SAP.

 

So Im asking you, is there really no possibilty to upload a logo in good quality?

 

 

Regards
Michael

IDoc for HR Master Data

$
0
0

Dear experts.

 

I have the following requirement.

 

I need to have an IDOC that allow download information when the master data is deleted using the t.code PA30 , ie when I delete information of infotype 0105

 

HR Master Data Distribution using ALE-IDOCS

 

What are the customizing that I need do in the system for get this ? How or where are configured when is data are deleted?

 

 

I have checked the following setting:

 

Images1.jpg

We are using the message type HRMD_A and Basic Type HRMD_A09

 

 

I have checked the t.codes:

 

BD61
BD50
SCDO
BD52
BD60
WE20
BD64
I need delete a register using the t.code PA30 , however this not work .

 

How can get this using this Message Type  HRMD_A and Basic Type HRMD_A09. The system in this moment only work when I create, maintain a data, however this not work when I delete a data.

 

Regards

 

 

 

 

Regards

Issue is deleting the conversion routine in a customized domain

$
0
0

Hi Team,

 

I have successfully deleted the conversion routine ALPHA from the customized domain and activated the same. But the problem persist is when the same field and domain is used in the PFCG transaction to set authorization for a particular filed type it considers the conversion routine ALPHA even inspite of deleting the same from SE11 in development system.

 

Please suggest why it is considering and I did find specifically debugged and found in the routine (FORM ORG_UNCONVERT_T_STORG_F4) of the program LSUPRNI0Y when we read the contents from the below internal table (I_DFIES) the conversion routine exist. Because of this issue it is truncating zero in adding the required group in the authorization section of PGCG transaction.

 

Below is the program from the routine.

 

READ TABLE I_DFIES WITH KEY FIELDNAME  = P_FIELDNAME

              BINARY SEARCH.

   IF SY-SUBRC = 0 AND I_DFIES-CONVEXIT NE SPACE.

     IF P_LOW NE '*'.   " note 678393

       DATA: CONV_FB_OUTPUT(30).

       CONV_FB_OUTPUT       = 'CONVERSION_EXIT_     _OUTPUT'.

       CONV_FB_OUTPUT+16(5) = I_DFIES-CONVEXIT.

       CONDENSE CONV_FB_OUTPUT NO-GAPS.

 

 

       CALL FUNCTION CONV_FB_OUTPUT

         EXPORTING INPUT  = P_LOW

         IMPORTING OUTPUT = P_LOW.

       CALL FUNCTION CONV_FB_OUTPUT

         EXPORTING INPUT   = P_HIGH

         IMPORTING OUTPUT  = P_HIGH.

     ENDIF.

   ENDIF.

Problem by uploading files via gui_upload with large files

$
0
0

I´m using gui_upload to upload files to the application server. When I´m trying to trasfer files bigger than 150MB I get the exception dp_out_of_memory.

 

How to upload a file of very huge size on to server.

$
0
0

Hi,

   I have a file of 2GB and i want to upload it onto the server. With GUI_UPLOAD the max file size i can upload is around 150mb or so. Do we have any solution like first upload first 150MB, next upload 150MB and append to the already uploaded 150mb and continue.

Or any alternate solutions possible. Thanks in advance.

 

Regards,

Vinay.

please suggest function module/BAPI to change incoming invoice status

$
0
0

Hi,

 

Please suggest function module or BAPI or any method to change the status(RBKP-RBSTAT) value  '3' to 1 for Incoming Invoice.

 

I checked with function module 'BAPI_INCOMININVOICE_CHANGE', but  status is not changing and throwing error as ' E M8 719 Further Processing of document && not possible (Faulty status).

 

I checked for many documents but getting same error .

 

 

Thanks& Regards,

Indra


Alv top of page header text is not displaying

$
0
0

Dear All.

 

Please find my program details . Top of Page header text is not displaying in Alv output. Please  I need your suggest ...

 

*&---------------------------------------------------------------------*
*&      Form  DISPLAY
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form DISPLAY .

  CALLFUNCTION'REUSE_ALV_GRID_DISPLAY'
  EXPORTING

    I_CALLBACK_PROGRAM                = 'SY_REPID'
*   I_CALLBACK_USER_COMMAND          = ' '
    I_CALLBACK_TOP_OF_PAGE            = 'TOP-OF-PAGE'
*   I_GRID_TITLE                     = 'PACKING SLIP(BOX WISE) DETAILS'
*   IS_LAYOUT                        =
*   IT_EVENTS                         = I_EVENTS
    IT_FIELDCAT                       = I_FCAT

   TABLES
     t_outtab                         = ITAB_FINAL
           .

endform.                    " DISPLAY

**&--------------------------------------------------------------------*
**& Form TOP_OF_PAGE
**&--------------------------------------------------------------------*
** text
**---------------------------------------------------------------------*
FORM TOP-OF-PAGE.

****Declaration of Header
DATA:IT_HEADER TYPE SLIS_T_LISTHEADER,
      WA_HEADER LIKELINEOF IT_HEADER,
      T_LINE LIKE WA_HEADER-INFO,
      LD_LINES TYPEI,
      LD_LINESC(10) TYPEC.

**Title
  WA_HEADER-TYP = 'H'.
  WA_HEADER-INFO = 'PACKING SLIP(BOX WISE) DETAILS'.
  APPEND WA_HEADER TO IT_HEADER.
  CLEAR WA_HEADER.


* *Invoice Number
   WA_HEADER-TYP  = 'S'.
   WA_HEADER-INFO = 'Invoice Number : '.
   WA_HEADER-KEY = P_EXNUM.
   APPEND WA_HEADER TO IT_HEADER.
   CLEAR WA_HEADER.


   callfunction'REUSE_ALV_COMMENTARY_WRITE'
     exporting
       it_list_commentary = IT_HEADER
       i_logo             = 'NCLLOGO'.

endform.                    " TOP-OF-PAGE


Can Transport of Copies requests be excluded from version management?

$
0
0

Does anyone know if Transport of Copies requests can be excluded from version management in the ABAP workbench?

 

They interfere with a process we have that compares current version of programs, function modules, classes, etc. to the previous version when the workbench request is released.

 

Regards,

Mark Perrey

BDC Okcode was not populating for FEBA Tcode

$
0
0

HI All,

 

After running the BDC recording for FEBA tcode, While execution through program in All screens mode OK CODE popup was not populating in SAPMF05A 710 (screen) and Reference radio button is not getting selected. Could you please let me know what could be the possible reasons. Please find the below code snippet &screen shot of recorded transaction.


perform bdc_dynpro      using 'SAPLNEW_FEBA' '0060'.

perform bdc_field       using 'BDC_CURSOR'

                               'SL_AZDAT-LOW'.

perform bdc_field       using 'BDC_OKCODE'

                               '=CRET'.

perform bdc_field       using 'SL_HKTID-LOW'

                               'AR04'.

perform bdc_field       using 'SL_AZDAT-LOW'

                               '06.12.2010'.

perform bdc_dynpro      using 'SAPLNEW_FEBA' '0100'.

perform bdc_field       using 'BDC_OKCODE'

                               '=BS_SAVE'.

perform bdc_dynpro      using 'SAPMF05A' '0710'.

perform bdc_field       using 'BDC_CURSOR'

                               'RF05A-XPOS1(06)'.

perform bdc_field       using 'BDC_OKCODE'

                               '=RW'.

perform bdc_field       using 'RF05A-AGBUK'

                               '1000'.

perform bdc_field       using 'RF05A-AGKOA'

                               'S'.

perform bdc_field       using 'RF05A-XNOPS'

                               'X'.

perform bdc_field       using 'RF05A-XPOS1(01)'

                               ''.

perform bdc_field       using 'RF05A-XPOS1(06)'

                               'X'.

perform bdc_dynpro      using 'SAPMF05A' '0731'.

perform bdc_field       using 'BDC_OKCODE'

                               '/EEND'.

perform bdc_field       using 'BDC_CURSOR'

                               'RF05A-SEL01(01)'.

perform bdc_dynpro      using 'SAPLSPO1' '0200'.

perform bdc_field       using 'BDC_OKCODE'

                               '=YES'.

perform bdc_dynpro      using 'SAPLNEW_FEBA' '0100'.

perform bdc_field       using 'BDC_OKCODE'

                               '=BS_BACK'.

perform bdc_transaction using 'FEBA'.


BDC.png


How I set the auto delete old spool request

$
0
0

Hi

 

I would like to know , how to auto delete old spool request. Have any option in SAP.

I want spool requests on server for 3 days only.

 

Pls suggest.

 

Tapovardhan

How to convert a front end BDC recording code(generated via SHDB) into a modular Code to be run in the background using 'Call Transaction' with error Log

$
0
0

In this article,we are going to convert a bdc recording macro code into a portable code that can be utilized and embedded in any posting based program in the background with a log as well using 'CALL TRANSACTION' mechanism.

 

We can import this recording for T-code ABAVN through the file attached in this article named 'bdc_recording_ABAVN.txt.zip' via Tcode shdb. Just extract it and then import it using the instructions as provided on the link below for the importing part in your system:

 

http://wiki.scn.sap.com/wiki/display/ABAP/ABAP+-+Tips+and+Tricks+Channel?original_fqdn=wiki.sdn.sap.com#ABAP-TipsandTricksChannel-[01]-HowtoexportaBDCrecordingfromoneclienttoanother:

 

For creating a batch upload program we will be using a  BDC recording in SAP carried out via transaction code 'SHDB'. We can ask a Functional Consultant of the specific module to create a BDC recording for a given transaction along with the fields that are required for batch upload. Once a recording is created we can generate a macro by clicking the [] Program button to generate the macro code for the given recording in SHDB. We can also run the macro recording in different modes as it was created originally by clicking the Process[] button in SHDB. We will follow steps from when the BDC recording macro has been created and saved as a program,with an option of 'Transfer from Recording' radio button selected in the Field Contents

                             

from the pop-up menu.

 

In our case,it will be a BDC recording for Tcode = ABAVN, which is used for directly retiring an Asset by Scrapping it,which is used in SAP FI module.

 

To have a look at the BDC recording macro code generated,refer to the code below:

__________________________________________________________________________________________________________________________

    [BDC Macro Code for Transaction ABAVN ]

 

report ZASSET_SCRAP_BDC
no standard page heading line-size 255.

include bdcrecx1.

start-of-selection.

perform open_group.

perform bdc_dynpro      using 'SAPLAMDP' '0100'.
perform bdc_field      using 'BDC_OKCODE'
                         
'=TAB02'.
perform bdc_field      using 'RAIFP2-ANLN1'
                           
'1010000017'.
perform bdc_field      using 'RAIFP2-ANLN2'
                         
'0'.
perform bdc_field      using 'RAIFP1-BLDAT'   
                           
'13.10.2015'.
perform bdc_field      using 'RAIFP1-BUDAT'
                         
'13.10.2015'.
perform bdc_field      using 'RAIFP1-BZDAT'
                         
'13.10.2015'.
perform bdc_field      using 'BDC_CURSOR'   
                         
'RAIFP2-SGTXT'.
perform bdc_field      using 'RAIFP2-SGTXT'
                         
'Asset Scrap'.
perform bdc_dynpro      using 'SAPLAMDP' '0100'.
perform bdc_field      using 'BDC_OKCODE'
                         
'=SHWD'.
perform bdc_field      using 'RAIFP2-ANLN1'   
                         
'1010000017'.
perform bdc_field      using 'RAIFP2-ANLN2'
                         
'0'.
perform bdc_field      using 'RAIFP2-MONAT'
                           
'09'.
perform bdc_field      using 'RAIFP1-BLART'
                           
'AA'.
perform bdc_field      using 'BDC_CURSOR'
                         
'RAIFP1-XBLNR'.
perform bdc_field      using 'RAIFP1-XBLNR'   
                         
'ASSET SCRAP'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field      using 'BDC_OKCODE'
                         
'=BUCH'.
perform bdc_transaction using 'ABAVN'.

perform close_group.

__________________________________________________________________________________________________________________________


Here is a brief description of the elements in the BDC recording Macro Code used in the code above:


> All the fields called in the BDC recording start with the the following fields e.g:  'perform bdc_fieldusing 'RAIFP1-BLART'' followed by a value which could either be a constant or a data object etc. as could be seen from the code above.


> The ones with the text 'BDC_CURSOR' follow up with the name of the field where the cursor is to be placed on the screen.

e.g:


perform bdc_field using 'BDC_CURSOR'
'RAIFP2-SGTXT'.


> When a specific screen or tab is called on a screen,it is usually followed with a  Module Pool Name and Screen No. e.g:


perform bdc_dynpro      using 'SAPLAMDP' '0100'.
perform bdc_field      using 'BDC_OKCODE'
'=TAB02'.


Here BDC_OKCODE is the ok code or an identifier for identifying which UI element  in Dynpro screen was clicked followed by the identifier id. For those of you who have done dynpro programming know the system constant sy-ucomm holds this value at runtime.


> Finally the transaction code for which this macro was generated is called using 'BDC_TRANSACTION'. e.g:


perform bdc_transaction using 'ABAVN'.


________


With the BDC recording out of the way,we can now concentrate on how  to convert it for Call Transaction Mechanism. The  best way to map fields is to create a single structure in ABAP for holding all values that are to be passed for all fields in the Macro recording discussed before.

e.g:

 

DATA: BEGIN OF s_assetscrap,
        bukrs type ANLA-BUKRS,"Company Code
        ANLN1 type anla-anln1,"Asset No
        ANLN2 type ANLA-ANLN2,"Sub Asset No
        BLDAT type RAIFP1-BLDAT,"Document Date
        budat type RAIFP1-BUDAT,"Posting Date
        BZDAT type RAIFP1-BZDAT,"Asset Value Date
        SGTXT type RAIFP2-SGTXT,"Text

        monat type RAIFP2-MONAT,"Posting Period
        BLART type RAIFP1-BLART,"Document Type
        XBLNR type RAIFP1-XBLNR,"Reference
      END OF s_assetscrap.


We now need to add in each of the BDC recording code lines to an internal table that will eventually be passed as a parameter when using the 'Call Transaction' construct. It will be based on 5 parameters as is required when calling a bdc code in Call Transaction construct based on the standard structure named 'BDCDATA'. Here are the fields in the structure:


  1. PROGRAM(Module Pool Name)
  2. DYNPRO(Screen No for the Dynpro)
  3. DYNBEGIN(BDC screen start)
  4. FNAM(Field name on the Screen)
  5. FVAL(Field value to be used)

 

Based on these fields,this is how we are going to convert it.


e.g:


"Original Code as provided in BDC recording macro


perform bdc_dynpro      using 'SAPLAMDP' '0100'.


"Code Converted for BDC recording called in Call Transaction construct


wa_bdcdata-program = 'SAPLAMDP'.

wa_bdcdata-dynpro = '0100'.

wa_bdcdata-dynbegin = 'X'.

wa_bdcdata-fnam = ''.

wa_bdcdata-fval = ''.


Compare the fields with the code above to get a better idea about value passed here.


Here is the complete code converted to the format as required for Call Transaction construct line by line.


_________[Each of the 19 Lines converted to Call Transaction Format based on BDCDATA structure]


> Add multiple records for this bdc recording in one go as well.


DATA:

     it_bdcdata type standard table of BDCDATA,

     wa_bdcdata like line of it_bdcdata.


"1

wa_bdcdata-program = 'SAPLAMDP'.

wa_bdcdata-dynpro = '0100'.

wa_bdcdata-dynbegin = 'X'.

wa_bdcdata-fnam = ''.

wa_bdcdata-fval = ''.


append wa_bdcdata it_bdcdata.

clear wa_bdcdata.


"...and so on. Only shortened code is shown here for illustrative purposes.


[Refer to the complete code in the attached text file named 'BDC_Recording_Code_Conversion_Code_Fragment.txt.zip'].


_________

 

 

The final element of transaction code  will be passed when using the final Call Transaction construct for uploading or posting .


dyn_begin = 'X' indicates that a screen is called at this point,therefore the module pool name and screen no is called here and for the rest field name and value pairs are passed in.


Here is how the final Call Transaction code will be called for posting this Asset Retirement via scrap:


DATA:

     it_msg type standard table of bdcmsgcoll."This will hold all Messages


  CALL TRANSACTION 'ABAVN' USING it_bdcdata

    MODE 'N'

    UPDATE 'S'

    MESSAGES INTO it_msg.

 

Here it_bdcdata is the BDC recording format converted for compatibility with BDC Recording.

     Mode   = N[For Running in the Background]

               [All Modes in BDC recording are supported like

                'E'(Errors),'A'(All Screens)]

     Update = S[Synchronous]

     it_msg = Holds all error messages and successful messages


For Logging,Internal table it_msg can be looped through for finding successful postings(msgtyp = 'S') and failed postings(msgtyp = 'F') of uploads via call transaction construct. e.g for successful messages:


LOOP AT it_msg INTO wa_msg WHERE msgtyp EQ 'S'.
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid= wa_msg-msgid
msgnr= wa_msg-msgnr
msgv1= wa_msg-msgv1
msgv2= wa_msg-msgv2
msgv3= wa_msg-msgv3
msgv4= wa_msg-msgv4
IMPORTING
message_text_output = wa_msg_all.

 

ENDLOOP.


Here the data object 'wa_msg_all' complete error message in one line, where as individual components are also store in one of the structures like wa_msg-msgid(Message Id number),wa_msg-msgnr(Message No),wa_msg-msgv1 to wa_msg-msgv4(contains error or successful messages with description).


Using this code mechanism through Call Transaction we can convert BDC recordings into portable executable code which can be embedded especially if you are working on a selective posting program using an interactive ALV report for selecting records and posting them.



Viewing all 8332 articles
Browse latest View live


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