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

issue in simple select statement

$
0
0

Hi,

     i am not knowing where i am going wrong,i checked with entries in se11 for faglflexa, there are many records in table but i am not able to fetch,

     please check below code,and find the error where iam going wrong.

 

 

types: BEGIN OF ty_faglflexa,

        RYEAR  TYPE GJAHR,

        DOCNR  type BELNR_D,

        RLDNR  TYPE FAGL_RLDNR,

        RBUKRS TYPE BUKRS,

        RRCTY  TYPE RRCTY,

        RACCT  TYPE RACCT,

        RCNTR  TYPE KOSTL,

        PRCTR  TYPE PRCTR,

        RFAREA TYPE FKBER,

        RBUSA  TYPE GSBER,

        KOKRS  TYPE KOKRS,

        poper  TYPE POPER,

        gjahr  TYPE gJAHR,

        END OF ty_faglflexa.

 

data:it_faglflexa TYPE TABLE OF ty_faglflexa,

      wa_faglflexa TYPE ty_faglflexa.

 

 

TABLES :skb1,faglflexa.

SELECTION-SCREEN :BEGIN OF block b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS :S_BUKRS for FAGLFLEXA-RBUKRS ,"OBLIGATORY,"comp code

S_SAKNR for  FAGLFLEXA-RACCT,"gl account

S_POPER for FAGLFLEXA-POPER ."OBLIGATORY. "posting period

PARAMETERS :S_year type FAGLFLEXA-RYEAR ,"OBLIGATORY," fiscal year

P_RRCTY type FAGLFLEXA-RRCTY.

SELECTion-SCREEN :END OF BLOCK b1.

 

START-OF-SELECTION.

 

SELECT RYEAR DOCNR RLDNR RBUKRS RRCTY RACCT RCNTR PRCTR RFAREA RBUSA KOKRS POPER GJAHR from

faglflexa into TABLE it_faglflexa where RYEAR = S_YEAR AND rbukrs in S_BUKRS and rrcty = p_rrcty

and racct in s_saknr and poper in s_poper.

 

if it_faglflexa is NOT INITIAL.

 

 

  endif.


Enable Edit button in FPM_OIF_COMPONENT

$
0
0

Hi all,

 

I don't know if this is the right place to post this

 

I have the requirement to enable button edit in the next screen:

 

1.png

This is the technical help:

 

2.jpg

 

They want this:

 

3.jpg

Is the same component, but I don't know where could I change that. What should I do?

 

Thanks in advance, best regards!

Gui_download quotation marks - Excell problem

$
0
0

We have a problem with quotation marks in some fields when we use gui_download!

 

Ex: we have this description  "ANHIAS ""SEGUROS .

 

Excel when it came across an opening quote considered the rest of the data to a single string and put it the same cell.

 

 

Is this a SAP problem or a Excel problem? is there anyway to solve it?

 

 

Thank you!

TABLE CREATION IN SAP ABAP

$
0
0

I created a table in se11 and i saved one date element in local object and other data element in package ,and i need answer whether table will activate or not ?

Dump when opening header text through vl03n

$
0
0

Hi,

 

I am adding a text in the delivery through vl02n.

After saving the changes when I am trying to see the text using TCODE - Vl03n, the program is getting terminated with the below message :-

VL03n_error.PNG

 

Error 2.PNG

Kindly provide your valuable inputs.

 

Thanks in advance.

 

Regards,

SAurabh

Issues passing a container element to a dropdown field.

$
0
0

Hello all.

 

I am hoping to get some guidance on an issue I currently am having with an SAP integration.  Since I am not an ABAP programmer, I am not even sure if what I am trying to do is feasible. 

 

Here is the scenario.  A third party application calls SAP via a web service.  This web service creates an SAP Workflow item in a users business workflow inbox.  This web service also passes along several container values which I am trying to populate the screen with when the workflow is executed.  The work item creates a MIRO transaction, The program code for the business object, in my case ZOBBUS2081, calls a custom function module that I have created and maps the values stored in the work items' containers to the MIRO transactions' screen elelements.. 

 

This works for the most part.  By that I mean that, when I execute the work item, I open a MIRO transaction and the values are transferred to the screen elements properly.  However, there are certain work items that get created where there is a container element meant to block payment on the PO.  The only differences here are that this screen value is a drop down as opposed to the other screen elements, which are simply text boxes, and this value is on the Payment tab of MIRO, where the rest of the transferred values are contained on the Basic Data tab.  When I try to execute a work item which is intended to be blocked for payment, this value is not passed at all.  The value of this container is simply 'A', which should

set the value "Blocked for payment". (The screen element is called "Pmnt block".

 

Below I have pasted my function module code.  The lines which represent this dropdown screen element are 80 and 81.  Also, the Z* elements in the bdc commands represent the container values I have passed to this function module.  Any comments and/or suggestions are greatly appreciated. 

 

 

 

FUNCTION Z_OB_MIRO_MCONTAINER.

*"----------------------------------------------------------------------

*"*"Local interface:

*"  IMPORTING

*"     VALUE(CTU) LIKE  APQI-PUTACTIVE DEFAULT 'X'

*"     VALUE(MODE) LIKE  APQI-PUTACTIVE DEFAULT 'A'

*"     VALUE(UPDATE) LIKE  APQI-PUTACTIVE DEFAULT 'L'

*"     VALUE(GROUP) LIKE  APQI-GROUPID DEFAULT 'ZONBASE'

*"     VALUE(USER) LIKE  APQI-USERID DEFAULT SY-UNAME

*"     VALUE(KEEP) LIKE  APQI-QERASE DEFAULT 'X'

*"     VALUE(HOLDDATE) LIKE  APQI-STARTDATE DEFAULT SY-DATUM

*"     VALUE(NODATA) LIKE  APQI-PUTACTIVE DEFAULT '/'

*"     VALUE(VORGANG_001) LIKE  BDCDATA-FVAL DEFAULT '1'

*"     VALUE(ZPROPINVOICEDATE) LIKE  BDCDATA-FVAL DEFAULT '20150107'

*"     VALUE(ZPROPPOSTINGDATE) LIKE  BDCDATA-FVAL DEFAULT '20150107'

*"     VALUE(ZPROPINVOICEAMOUNT) LIKE  BDCDATA-FVAL DEFAULT 100

*"     VALUE(ZPROPTAXCODE) LIKE  BDCDATA-FVAL DEFAULT 'I0'

*"     VALUE(REFERENZBELEGTYP_006) LIKE  BDCDATA-FVAL DEFAULT '1'

*"     VALUE(ZPROPPONUMBER) LIKE  BDCDATA-FVAL DEFAULT '4701203729'

*"     VALUE(ZPROPPOAMOUNT) LIKE  BDCDATA-FVAL DEFAULT 100

*"     VALUE(ZPROPPOQUANTITY) LIKE  BDCDATA-FVAL DEFAULT '1'

*"     VALUE(ZPROPSAPCOMPANYCODE) LIKE  BDCDATA-FVAL DEFAULT 'C109'

*"     VALUE(ZPROPINVOICENUMBER) LIKE  BDCDATA-FVAL DEFAULT '1322'

*"     VALUE(ZPROPTAXAMOUNT) LIKE  BDCDATA-FVAL DEFAULT '0.00'

*"     VALUE(ZPROPSAPCURRENCY) LIKE  BDCDATA-FVAL DEFAULT 'USD'

*"     VALUE(LIFNR_010) LIKE  BDCDATA-FVAL DEFAULT '5304'

*"     VALUE(ZBLOCK) LIKE  BDCDATA-FVAL DEFAULT 'A'

*"  EXPORTING

*"     VALUE(SUBRC) LIKE  SYST-SUBRC

*"  TABLES

*"      MESSTAB STRUCTURE  BDCMSGCOLL

*"----------------------------------------------------------------------

 

 

*  type-pools: VRM.

 

 

  data l_buk like bkpf-bukrs.

  subrc = 0.

 

 

  perform bdc_nodata      using NODATA.

  perform open_group      using GROUP USER KEEP HOLDDATE CTU.

 

 

 

 

 

 

perform bdc_dynpro      using 'SAPLMR1M'           '6000'.

perform bdc_field       using 'BDC_OKCODE'         '/00'.

perform bdc_field       using 'RM08M-VORGANG'      VORGANG_001.

 

 

  CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'

       EXPORTING

            INPUT  = ZPROPINVOICEDATE

       IMPORTING

            OUTPUT = ZPROPINVOICEDATE.

 

 

  perform bdc_field      using 'BDC_CURSOR'          'INVFO-BLDAT'.

  perform bdc_field       using 'INVFO-BLDAT'        ZPROPINVOICEDATE.

 

 

  CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'

       EXPORTING

            INPUT  = ZPROPPOSTINGDATE

       IMPORTING

            OUTPUT = ZPROPPOSTINGDATE.

 

 

  perform bdc_field       using 'INVFO-BUDAT'        ZPROPPOSTINGDATE.

  perform bdc_field       using 'INVFO-XBLNR'        ZPROPINVOICENUMBER.

  perform bdc_field       using 'INVFO-WRBTR'        ZPROPINVOICEAMOUNT.

  perform bdc_field       using 'INVFO-WAERS'        ZPROPSAPCURRENCY.

  perform bdc_field       using 'INVFO-WMWST'         ZPROPTAXAMOUNT.

  perform bdc_field       using 'RM08M-REFERENZBELEGTYP'    REFERENZBELEGTYP_006.

 

 

  perform bdc_field       using 'BDC_CURSOR'         'RM08M-EBELN'.

  perform bdc_field       using 'RM08M-EBELN'         ZPROPPONUMBER.

  perform bdc_dynpro      using 'SAPLMR1M'           '6610'.

  perform bdc_field       using 'BDC_CURSOR'         'RM08M-LIFNR'.

  perform bdc_field       using 'RM08M-LIFNR'         LIFNR_010.

 

 

  perform bdc_dynpro      using 'SAPLMR1M'            '6000'.

  perform bdc_field       using 'BDC_OKCODE'  '=HEADER_PAY'.

 

 

perform bdc_field      using 'BDC_CURSOR'          'INVFO-ZFBDT'.

perform bdc_field      using 'BDC_CURSOR'          'INVFO-ZLSPR'.

perform bdc_field       using 'INVFO-ZLSPR'         ZBLOCK.

 

 

 

 

  perform bdc_transaction tables messtab

  using                         'MIRO'

                                CTU

                                MODE

                                UPDATE.

  if sy-subrc <> 0.

    subrc = sy-subrc.

    exit.

  endif.

 

 

  perform close_group using     CTU.

 

 

 

 

ENDFUNCTION.

 

 

 

Thanks in advance!

 

- Kurt Kapferer

EVENTS IN REPORTS

$
0
0

what is the differences between AT SELECTION SCREEN AND AT SELECTION OUTPUT ?

Change sy-repid value.

$
0
0

Hi everybody.I needed to copy report RFIDYYWT but i noticed that this report has some validations considering sy-repid value. In this way, any copies from this report do not work. I`m thinking about change the sy-repid value in initialization or maybe has any configuration for this report copy work correctly? Thank`s!


Activating Generic Object Services Toolbar in SAP Objects for Transaction code MB02

$
0
0

Hi,

 

We have a requirement in our project for Activating Generic Object Services Toolbar in SAP Objects for TCode MB02.

 

At present we have this toolbar in MB03, but not in MB02. So if someone has already done this and have any idea of how to do this will help me.

 

The Object Type for transaction is BUS2017. So if any one can tell me the include and the logic how to do this will be helpful.

 

Thanks,

Nagesh Thanneeru

selected line item VA03 user exit

$
0
0

Hi Guys,

 

     I need to perform some logic when user selects a line item in VA03. And this logic has to be based on the line item selected. I wrote this logic in MV45AFZB. As per discussions on this forums we were using SVBAP-tabix field to find the selected line item. But it doesn't seem to work.

 

Any suggestions as where would be the best place to right this logic or which field holds the line item selected?

 

Appreciate your help.

 

Thanks,

Getting the Table from CL_GUI_ALV_GRID

$
0
0

I have an interesting problem.

 

I have the object io_alv_grid of type CL_GUI_ALV_GRID in this method of a BADI that I'm implementing, but I do not have the actual data of the internal table.

 

Is there any way to extract the data of the alv from that object?

 

The BADI is WORKORDER_INFOSYSTEM, method AT_OUTPUT_SCREEN_LAY and I can get the data from an earlier method by EXPORT/IMPORT, which works fine. Except that if the user has any layout or sorting set (which they do) my internal table is incorrect. I need it in it's current state so that I can get selected rows and do actions based on a button pressed.

 

 

Thank you for any help.

Accessing all the line items of Purchase requisition(ME51N)

$
0
0

Hi All,

 

Is there any way to access all the line items of a purchase requisition(ME51N) at a time?  I Implemented a BADI ‘ME_PROCESS_REQ_CUST’ and check all the interfaces like PROCESS_ITEM, CHECK, POST etc and found these interfaces only triggers for one line item which is currently being processed. Can anyone suggest.

 

Regards,

Jitendra

Can we show possible set of values for a field without pressing F4 button on input screen

$
0
0

Hi All,

 

 

I got a requirement like,

 

        input screen:

                   Material number : [        ]

                    plant                : [        ]

                   material type     : [        ].

 

Ya, Here I am giving material number and material type,  then I will get plant details as F4 help if I  use F4IF_INT_VALUE_REQUEST function module.  here my requirement is, i wont press F4 button but i need show possible of values when I entered  material number and material type.

 

 

Note: but I knew without user action on F4 button we cant see those possible set of value.  I intimated to my client but he is not accepting my call.

Asset posting using BAPI_ACC_DOCUMENT_POST

$
0
0

Hi,

 

I am trying to post Asset using above BAPI. The error i am getting here is

"Required field GL_ACCOUNT was not transferred in parameter ACCOUNTGL"

 

How i am passing to G/L Structure is : if G/L Account does not exists then passing only asset number (ANLN1) to BAPI.

So i am getting above error message.

 

Do i suppose to handle this in different way ? i have seen many posts about asset postings which could not helps me.

we can manually post asset, but could not through BAPI.

 

can any one suggest on this please.

ALV grid display with Calendar View

$
0
0

Hi Experts,

 

Need to have below design for my ALV (Please Ignore the color coding).

 

Pointers : Last 30 days data should be displayed in calendar format of ALV grid(Shown below).

 

Expected Functionality : If a user clicks on particular date the hotspot should display the data of that particular day in either of the below containers based on file being transmitted or not.

 

Any help in design part would be rewarded.!!

 

 

 

Thanks and Regards

Kishan Shah


Issue with ADD_ATTACHMENT IN CLASS cl_document_bcs

$
0
0

Hi All,

 

 

I am using add_attachment option to send FDF file data as email attachment. as shown below..

 

 

I am manually writing the fdf file with tags..as shown below.

 

 

But I am facing two Issues..one I am getting space before and after each character in the file and in the file it' not recognizing the new line even though I append then in my file.

 

If I change the file type to TXT the file is coming as expected.

 

Could any tell me why it's not working for the file type FDF..Do I have to do any uni code conversion..? If so How I have to do it.

 

I appreciate your help on this.

 

Please find the attached sample FDF file generated with spaces and without new line.

 

constants: d14(8) VALUE '%FDF-1.2',

                      d15(6) VALUE '%âãÏÓ',

                      d16(7) VALUE '1 0 obj',

                      d17(20) VALUE '/FDF << /Fields [',

                      d18(6VALUE '[ << /T ('.

 

CONCATENATE d14 cl_abap_char_utilities=>cr_lf

              d15 cl_abap_char_utilities=>cr_lf

              d16 cl_abap_char_utilities=>cr_lf

              d17 cl_abap_char_utilities=>cr_lf

              d18 'COMPANY_ADDRESS'  d03  gs_comp_addr-name1 INTO wa_fdf.

 

CONDENSE wa_fdf.

  APPEND wa_fdf TO it_fdf.

  CLEAR:wa_fdf.

 

ls_atatchments-objtp = 'fdf'.

             ls_atatchments-subject = pv_subject.

             ls_atatchments-cont_text = it_fdf.

 

APPEND ls_atatchments TO attachment.

 

 

 

LOOP AT attachment INTO ls_atatchments.

               TRY.

 

CALL METHOD lo_document->add_attachment

                       EXPORTING

                         i_attachment_type    = ls_atatchments-objtp

                         i_attachment_subject = pv_title

                         i_att_content_text   = ls_atatchments-cont_text.


endloop.

 

 

 

 

Thanks,

Sara.

find the value change history for a table

$
0
0

Hi Pros,

 

        I don't activate change log feature for table, but I still want to find the value change history for a table. please tell me how to check it?

 

thanks.

New line for text file

$
0
0

Hi,

 

 

I am trying to send text file as an email attachment using   cl_document_bcs->add_attachment method.

 

My requirment is to get the file in below format..

 

%FDF-1.2%âãÏÓ

1 0 obj

<</FDF

<</Fields[

<</T(COMPANY_ADDRESS)/V(ABC PVT) Ltd PO Box 7058 Greenstone 1616 ZA ZA)>>

 

/ID[]/UF()>>/Type/Catalog>>

endobj

trailer

<</Root 1 0 R>>

%%EOF


I have hard coded most of the stuff like below..

DATA:

DATA:it_fdf  TYPE bcsy_text,

                 wa_fdf TYPE soli.


CONSTANT:

d14(8) VALUE '%FDF-1.2',

                      d15(6) VALUE '%âãÏÓ',

                      d16(7) VALUE '1 0 obj',

                      d17(20) VALUE '/FDF << /Fields [',

                      d18(6VALUE '[ << /T ('.



wa_fdf = d14.

  CONDENSE wa_fdf.

  APPEND wa_fdf TO it_fdf.

  wa_fdf = d15.

  CONDENSE wa_fdf.

  APPEND wa_fdf TO it_fdf.

  wa_fdf = d16.

  CONDENSE wa_fdf.

  APPEND wa_fdf TO it_fdf.

  wa_fdf = d17.

  CONDENSE wa_fdf.

  APPEND wa_fdf TO it_fdf.


  ls_atatchments-objtp = 'txt'.

             ls_atatchments-subject = pv_subject.

             ls_atatchments-cont_text = it_fdf.

             APPEND ls_atatchments TO attachment.

 

CALL METHOD lo_document->add_attachment

                       EXPORTING

                         i_attachment_type    = ls_atatchments-objtp

                         i_attachment_subject = pv_title

                         i_att_content_text   = ls_atatchments-cont_text.

 

 

but output text file is appearing as per the attachment..

 

but I want to write text file like

%FDF-1.2%âãÏÓ- in first line

1 0 obj- in second line (Currently second line is appearing in first line after 250 char as line for SOLI is 250 char...)


Could you any one tell me how I can achieve this in order to get the line in second line not after the 250 char..?


I really appreciate your help on this.

 

Thanks,

Sara.

Po Creation Price Change Updation.

$
0
0

I am fetching some pricing condition values from  the  ztable, And    passing to PO   while  creation.

 

BADI: ME_PROCESS_PO_CUST

 

 

METHOD: IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM

 

 

CODE:

 

im_item->get_conditions( IMPORTING ex_conditions = lt_conditions ).

 

LOOP AT  lt_conditions INTO ls_condition  WHERE  kposn = ls_mepoitem-ebelp. "AND

                                                                              kschl = 'ZGR'.

         lv_flag = 'X'.

         ls_condition-kbetr    = lv_exval.

         ls_condition-kwert    = lv_exval.

         MODIFY lt_conditions FROM ls_condition TRANSPORTING kbetr kwert.

         im_item->set_conditions( EXPORTING im_conditions = lt_conditions ).

ENDLOOP.

 

While executing  Pricingvalues updated in ME21N  but displaying

ERROR An endless loop occurred during the processing of the Business Add-In ME_PROCESS_PO_CUST. The system terminated the processing.

 

 

ADDED Below code to avoid  Error.

 

cl_po ?=  im_header.

    IF NOT  cl_po->my_recheck_queue IS INITIAL.

        CLEAR cl_po->my_recheck_queue.

      ENDIF.

 

But   pricing conditions  values not getting updated in Po.

Exception handling

$
0
0

Please explain the following statement in Exception handling...

 

The highest levels to which an exception can be propagated are processing blocks without local data areas, that is event blocks or dialog modules.

 

Many thanks

Viewing all 8332 articles
Browse latest View live


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