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

Changing LPI parameter value in SPAD - Format

$
0
0

Hello experts,

 

I have a question regarding the LPI (Lines Per Inch) parameter that can be parameterized for a Format associated with a Device Type using transaction SPAD.

 

From a couple of forum searches I gathered that both the LPI parameter and the ‘Page Lines’ parameter are used to define the vertical height of the page. I also noticed that all the format/printer settings that were displayed in replies to other threads had the LPI parameter with the value 6, which is parameterized using the expression: \e\0x32. SAP documentation regarding Device Formats (http://help.sap.com/saphelp_40b/helpdata/en/d9/4a95af51ea11d189570000e829fbbd/content.htm) states that the value after the ‘x’ is in Hexadecimal numeration. Nevertheless, the number 32 has 50 as its decimal correspondent and not 6 as one would expect.

 

So, can anyone explain me what is the process behind the parameterization of the LPI parameter?

I would like to know that in order to change a 6 LPI parameter to 9 LPI parameter.

 

Thanks and Regards.


Internal table Usage problem in ABAP ...

$
0
0

Hi Experts,

 

It is abit hard to explain what I need here.

But I try to explain as much as I can.

 

i m using this structure

******* Declaration Part Starts ********

DATA: BEGIN OF XVBPA OCCURS 0.                   "#EC ENHOK

         INCLUDE STRUCTURE VBPAVB.

DATA: END OF XVBPA.

 

DATA:  w_kunnr TYPE vbpa-kunnr.

******* Declaration Part  Ends ********

 

.

.

.

 

and using this SELECT query

 

SELECT SINGLE kunnr FROM xvbpa INTO w_kunnr WHERE parvw eq lc_ag.

 

it gives error...

 

Please let me know what shold i used or shall use any other table to fetch like READ TABLE statement???

Which Variants are being used in reports

$
0
0

Hello,

I am trying to find out which variants are being used on reports and who is running them and then would further like to expand what fields are being populated in those variants?  Is there a report / query we could run for this? Or even a table i could interrogate?

 

Thanks in advance.

Kind regards.

BAPI_ACC_DOCUMENT_POST extra tax line in bset + maybe wrong values?

$
0
0

Hello everyone,

 

I can't access our system right now, but i will try to summarize my issue :

 

We are making a vendor document posting via bapi BAPI_ACC_DOCUMENT_POST.

 

In customizing (FTXP), we have a tax code 'AM', containing 2 percentages rates :

 

Input tax                    VST     10,5     120     100     MWVS

Non deduct.input tax     NVV     10,5     140     100     MWVZ

 

 

We filled the tables for the bapi (accountgl, accountpayable, accounttax, currencyamount).

 

Particularly for this tax code, we filled the last line of currency amount with the base_amount (amt_base 800) and amount tax (amt_doccur 84).

 

We also filled  a line in accountax (linked with the same itemno_acc) to specify the condition type of the tax -> MWVS with a tax_rate.

 

BAPI is well executed and a document is created and we see (FB03) the item lines and the tax line at the bottom, good

 

But when we take a look at BSET table, we have a first line with transaction type VSF (NWMS), but too another line with transaction type NVV (MWVZ) (seems logic because it is in the custom calc procedure), but with a base amount of 884 (base + tax values? ...), and a tax amount of 42 (half of first line tax !

 

I don't know how SAP added the line for the condition MWVZ, because we didn't filled a second line in the accounttax table for condition...

 

I tried to debug the BAPI, and found at a point the table XBSET, already filled with these value; but couldn't find where this was calculated/filled by SAP.

 

Does someone would be so kind to guide us in finding how and why SAP give these amounts please?

 

 

Thank you in advance and best regards,

1099 Custom DME file format

$
0
0

Hi,

I am creating a custom file format for the 1099 DME file format, copying the standard format IDWTFILE_US_1099. All the T, A, B, C, K and F records are there in the standard file format and hence available in the custom file format. Now the issue with the custom file format is that the record sequence number is not getting updated fo the transmission records. i.e., the T record which should contain 00000001, is coming with 00000000 and the same case with A, C and F records.

Similarly, for the B records, which should start with 00000003 and end with 0000000n (n being the number of B records) is having 00000003 or all the B records.

Please advise if I am missing any setting between the standard and the custom file formats. Thanks.

Access other users workitems in my SAP inbox without setting substitute

$
0
0

Hi Experts,

      I have a requirement where BASIS wants to see each other work items in their SAP inbox (currently they can see their own workitems). I know we can set a substitute or forward workitem to another user using SWIA but they don't want to do that (clicking on even "adopt substitute"). They want each others workitems appeanr automatically in their SAP inbox when they access it. I did find a function module and can add custom code there by using enhancement framework but I don't want to take that approach. I have been researching on SDN from a week and finally decided to post my question on this thread. Can someone please provide any information how to acheive this?

 

Thanks.

--RY

How to see other users workitems in my sap inbox without setting substitute

$
0
0

Hi Experts,

      I have a requirement where BASIS wants to see each other work items in their SAP inbox (currently they can see their own workitems). I know we can set a substitute or forward workitem to another user using SWIA but they don't want to do that (clicking on even "adopt substitute"). They want each others workitems appeanr automatically in their SAP inbox when they access it. I did find a function module and can add custom code there by using enhancement framework but I don't want to take that approach. I have been researching on SDN from a week and finally decided to post my question on this thread. Can someone please provide any information how to acheive this?

 

Thanks.

--RY

RH_STRUC_GET Performance

$
0
0

Hi Experts !

 

Im using RH_STRUC_GET  standard SAP function module to get Organizational Structure.

 

But i have performance issue, now is very slow.

 

I need same help to optimize this execution.

 

Best Regards,

Marco


How to edit an existing Excel file?

$
0
0

Hello,

 

I am trying to edit an Excel file (.xlsx) that is located on a shared folder. This Excel workbook has 2 worksheets inside it. Sheet1 has some raw data in table form, while Sheet2 has a chart that uses the data from Sheet1.

 

I need to open the file and modify only Sheet1 by overwriting its content with the content from an internal table. I have tried the following methods:

 

FM 'MS_EXCEL_OLE_STANDARD_DAT'

     This FM doesn`t let me edit an XLS file, it will only create a new one (or completely overwrite an existing one) with only one sheet with the data inside. This method will also automatically launch the Excel application.

 

FM GUI_DOWNLOAD

     Pretty much the same reasons as the previous option.

 

Class cl_xlsx_document

     I have tried the following code

    

 

      lv_file_data = cl_openxml_helper=>load_local_file( 'C:\export.xlsx' ).

     lo_package = cl_xlsx_document=>load_document( iv_data = lv_file_data ).

 

     lo_parts = lo_package->get_parts( ).

     lo_part = lo_parts->get_part( 2 ).

 

     lo_parts = lo_part->get_parts( ).

     lo_part = lo_parts->get_part( 2 ).

 

     lv_uri = lo_part->get_uri( )->get_uri( ).

 

     lo_xml_part_uri = cl_openxml_parturi=>create_from_partname( lv_uri ).

     lo_xml_part = lo_package->get_part_by_uri( lo_xml_part_uri ).

     lv_data_xstring = lo_xml_part->get_data( ).

 

     But then, I don't know how to edit this data and overwrite the data for this one sheet and re-save it in the file.

 

Any help is greatly appreciated!

 

Thanks,

 

Vincent

 

 


smart form

$
0
0

Hi all,

 

     I have one requirement on bar code in smart form. I have done every thing on that but my user want to print that bar code horizontally for example each line should have 4 bar code but it is printed vertically one by one like below screen shot. How can i achieve this. Do the needful.

 

barcode.PNG

 

My requirement is i want to print this bar code horizontally by each have 4 bar code per row.

 

Please help to achieve this.

 

Thank you.

 

Long text question..

$
0
0

Hi Gurus,

                  I've got a strange problem. When i goto transaction iw32 or ia05 and click the long text for operations, we get 2 editors, one is graphical form painter (which has word in it) and one is pc editor. We use Sapscripts.The problem is , the ruler on top of pc editor shows 7.2 inches (72 chars), but the ruler on the word editor show 6.5 inches (65 chars). The functional ppl are having problem with this because when they enter 72 chars in pc editor, the charaters get skipped after 6.5 inches in word editor and also while taking print. The width of the window is 16.5 cm( 6.5 inches). They need to know why is there a difference between the rulers of both editors. Please let me know, will rewards points as necessary.

 

Thanks,

Vandana

Complex SELECT causes short dump

$
0
0

Hello Experts,

I’m trying to write a complex SELECT statement to gather data from PA0000, PA0001, PA0002, PA0006 and PA0041 table but keep getting short dump.  Can somebody please help me rectify this issue? For reference here is my code.

 

Types: begin of t_pa,
          pernr01  type  persno,
          orgeh    type  orgeh,
          plans    type  plans,
          kostl    type  kostl,
          pernr00  type  persno,
          stat2    type  stat2,
          massn    type  massn,
          massg    type  massg,
          pernr02  type  persno,
          sprsl    type  pad_spras,
          nachn    type  pad_nachn,
          vorna    type  pad_vorna,
          pernr06  type  persno,
          subty    type  subty,
          telty    type  comky, "MAIN
          telnr    type  telnr,
          com01    type  comky,
          num01    type  comnr,
          com02    type  comky,
          num02    type  comnr,
          com03    type  comky,
          num03    type  comnr,
          com04    type  comky,
          num04    type  comnr,
          pernr41  type  persno,
          dat01    type  dardt,
          dat02    type  dardt,
          zzrank   type  zrank,
        end of t_pa.


Data: gt_pa         type table of t_pa        initial size 0.

 

select pa0001~pernr
          pa0001~orgeh
          pa0001~plans
          pa0001~kostl
          pa0000~pernr
          pa0000~stat2
          pa0000~massn
          pa0000~massg
          pa0002~pernr
          pa0002~sprsl
          pa0002~nachn
          pa0002~vorna
          pa0006~pernr
          pa0006~subty
            "pa0006~telty "MAIN
          pa0006~telnr
          pa0006~com01
          pa0006~num01
          pa0006~com02
          pa0006~num02
          pa0006~com03
          pa0006~num03
          pa0006~com04
          pa0006~num04
          pa0041~pernr
          pa0041~dat01
          pa0041~dat02
          pa0041~zzrank
          from ( ( ( ( pa0001 inner join pa0000
                       on pa0001~pernr = pa0000~pernr )
                             inner join pa0002
                       on pa0001~pernr = pa0002~pernr )
                             inner join pa0006
                       on pa0001~pernr = pa0006~pernr )
                             inner join pa0041
                       on pa0001~pernr = pa0041~pernr )
           into table gt_pa
           where pa0001~bukrs = c_bukrs
            and  pa0001~pernr in s_pern.

     if gt_pa[] is initial.
      message e003.
       exit.
     else.
       sort gt_pa by pernr01 stat2.
       delete gt_pa where stat2 ne '1'
                             and stat2 ne '3'.

     endif.

Many thanks in advance.

Smartform page footer problem

$
0
0

Hi,

 

I created a SmartForm that has a different header on the first page header and another on "Next" page .. On every page I have a main window, occupying the rest of the page and in this window I have a loop to generate and print rows in a table. I need to print information in the footer of the page (which has 6.75 cm) after the end of the cycle and I am not able to do that ..

 

My problem is the loop does not have a fixed number of rows and create a main window leaving the area 6.75 cm at the end of the page I lose that space on every page except the last page (it will have the footer). I also tried to put the information I need in the page footer as the last item in the main window. Work, but if the end loop in the middle of the page, the information will print in the middle of the page not the bottom ...

 

How do I create text / other items in the main window that will be printed only at the bottom of the last page even if the loop does not use all available page space between the header and footer area?

 

Thanks all!

 

Best regards.

MM BAPI with MARA and Matnr Classification Data

$
0
0

Hello all,

     I need a way to take a value in the material's classification and push it to a value in the material master.  This should be called for create and updates.  I first implemented BADI_MATERIAL_CHECK method CHECK_DATA.  That works correctly for everything on the GUI from MM01, to MM02 to mass maintenance.  This works because I look in the stack and get the classification data from (SAPLCLFM)ALLAUSP[] and then push it to the CMARA parameter in the BADI.  The problem is that when you call the BAPI_MATERIAL_SAVEDATA from outside of SAP via and RFC the values that are in

(SAPLCLFM)ALLAUSP[] aren't there.

 

So any ideas?  I looked at CACL_VALUE_CHANGE and the MODIFY_INPUT method but I can change only the classification data there. 

 

If anyone has any suggestions along these lines it would be most helpful.

 

Thanks.

 

How to get the hardware key (HWID) for licence minisap 6.10


How to delete from internal table based on value size?

$
0
0

Hi experts,

 

  I have a internal table which has one of the field called "batch".

 

  I want to delete those rows from this internal table where size of batch value is more than 8 chars. Is this possible without looping?

 

  Please help.

 

Thanks

Goapl

Need to add field in miro using badi or exit....?

$
0
0

Hi guys,

 

I have added field in MIGO by finding out badi and by written a code in pbo .

But in miro there is no pbo..Here only get and put methods we have.

So how could i add any field just for demo purpose in miro...

function idoc_inbound_asynchronous is not available

$
0
0

Hi Experts,

 

 

We are using ALE for SAP-to Non SAP. We are getting error (function idoc_inbound_asynchronousis not available)  for mass processing. Could you please help me what could be the root cause for this.

 

We are processing in IDOCs in collect mode.

 

 

 

Thanks In Advance,

Kiran.

BAPI_GOODSMVT_CREATE for GRN posting

$
0
0

Hi Experts,

I am using BAPI_GOODSMVT_CREATE for posting GRN against Purchase Order.

I want to post Quantity in Delivery note(LSMNG) and Unit of Measure From Delivery Note(LSMEH) also.

I used itab-QUANTITY = '1'.

itab-BASE_UOM = 'L'.

but it is not getting updated properly.

I am getting document number and GRN has been done against Purchase Order using this BAPI.All other fields are properly getting updated except these 2 fields Qty in delivery note and unit of delivery note. Can i pass these 2 field values using this BAPI or do I need to use any other BAPI. Is there any BAPI for MIGO instead of MB01?

 

Can any one help me to pass these values through BAPI

 

Regards,

Sam

How to get domain text instead of domain value in table using events

$
0
0

How to get domain text instead of domain value in table using events

Viewing all 8332 articles
Browse latest View live


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